From 1ffeeefe9f25d6bdad01980af62bf9d2e49dddad Mon Sep 17 00:00:00 2001 From: rjl493456442 Date: Tue, 21 Nov 2023 10:47:37 +0800 Subject: [PATCH] core/state/snapshot: print correct error from trie iterator (#28560) --- core/state/snapshot/generate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/state/snapshot/generate.go b/core/state/snapshot/generate.go index adeaa1daa01e..f455a6db3fcb 100644 --- a/core/state/snapshot/generate.go +++ b/core/state/snapshot/generate.go @@ -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 // error here, as the outer code will presume errors are interrupts, not // 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 } // Delete all stale snapshot states remaining