[#1000] adm: Use default batch size for TraverseIterator()
All checks were successful
DCO action / DCO (pull_request) Successful in 1m30s
Vulncheck / Vulncheck (pull_request) Successful in 2m52s
Build / Build Components (1.21) (pull_request) Successful in 4m0s
Build / Build Components (1.20) (pull_request) Successful in 4m8s
Tests and linters / Staticcheck (pull_request) Successful in 5m9s
Tests and linters / Lint (pull_request) Successful in 6m8s
Tests and linters / Tests (1.20) (pull_request) Successful in 7m36s
Tests and linters / Tests with -race (pull_request) Successful in 7m53s
Tests and linters / Tests (1.21) (pull_request) Successful in 8m10s

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
parent c99571deb2
commit 54caf1bde8

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)