core/state/snapshot: print correct error from trie iterator (#28560)

This commit is contained in:
rjl493456442 2023-11-21 10:47:37 +08:00 committed by GitHub
parent 460cc1673e
commit 661bd45188
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -446,7 +446,7 @@ func (dl *diskLayer) generateRange(ctx *generatorContext, trieId *trie.ID, prefi
// Trie errors should never happen. Still, in case of a bug, expose the // Trie errors should never happen. Still, in case of a bug, expose the
// error here, as the outer code will presume errors are interrupts, not // error here, as the outer code will presume errors are interrupts, not
// some deeper issues. // some deeper issues.
log.Error("State snapshotter failed to iterate trie", "err", err) log.Error("State snapshotter failed to iterate trie", "err", iter.Err)
return false, nil, iter.Err return false, nil, iter.Err
} }
// Delete all stale snapshot states remaining // Delete all stale snapshot states remaining