[#1000] adm: Use default batch size for TraverseIterator()

Nothing is broken now, but will easily become if we change nnsMaxTokens,
thus this change.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-02-21 15:29:08 +03:00 committed by Evgenii Stratonikov
parent 4b13b85173
commit abea258b65

View file

@ -177,12 +177,12 @@ func dumpCustomZoneHashes(cmd *cobra.Command, nnsHash util.Uint160, zone string,
_ = inv.TerminateSession(sessionID)
}()
items, err := inv.TraverseIterator(sessionID, &iter, nnsMaxTokens)
items, err := inv.TraverseIterator(sessionID, &iter, 0)
for err == nil && len(items) != 0 {
for i := range items {
processItem(items[i])
}
items, err = inv.TraverseIterator(sessionID, &iter, nnsMaxTokens)
items, err = inv.TraverseIterator(sessionID, &iter, 0)
}
if err != nil {
return fmt.Errorf("error during NNS domains iteration: %w", err)