|
|
@ -332,6 +332,11 @@ func traverseState(ctx *cli.Context) error { |
|
|
|
storageIter := trie.NewIterator(storageIt) |
|
|
|
storageIter := trie.NewIterator(storageIt) |
|
|
|
for storageIter.Next() { |
|
|
|
for storageIter.Next() { |
|
|
|
slots += 1 |
|
|
|
slots += 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if time.Since(lastReport) > time.Second*8 { |
|
|
|
|
|
|
|
log.Info("Traversing state", "accounts", accounts, "slots", slots, "codes", codes, "elapsed", common.PrettyDuration(time.Since(start))) |
|
|
|
|
|
|
|
lastReport = time.Now() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if storageIter.Err != nil { |
|
|
|
if storageIter.Err != nil { |
|
|
|
log.Error("Failed to traverse storage trie", "root", acc.Root, "err", storageIter.Err) |
|
|
|
log.Error("Failed to traverse storage trie", "root", acc.Root, "err", storageIter.Err) |
|
|
@ -486,6 +491,10 @@ func traverseRawState(ctx *cli.Context) error { |
|
|
|
if storageIter.Leaf() { |
|
|
|
if storageIter.Leaf() { |
|
|
|
slots += 1 |
|
|
|
slots += 1 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if time.Since(lastReport) > time.Second*8 { |
|
|
|
|
|
|
|
log.Info("Traversing state", "nodes", nodes, "accounts", accounts, "slots", slots, "codes", codes, "elapsed", common.PrettyDuration(time.Since(start))) |
|
|
|
|
|
|
|
lastReport = time.Now() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if storageIter.Error() != nil { |
|
|
|
if storageIter.Error() != nil { |
|
|
|
log.Error("Failed to traverse storage trie", "root", acc.Root, "err", storageIter.Error()) |
|
|
|
log.Error("Failed to traverse storage trie", "root", acc.Root, "err", storageIter.Error()) |
|
|
|