Skip to content

Commit 83f3fc2

Browse files
authored
core/state/snapshot: be very noisy if the generator hits a trie error (#28178)
1 parent 03c2176 commit 83f3fc2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/state/snapshot/generate.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,10 @@ func (dl *diskLayer) generateRange(ctx *generatorContext, trieId *trie.ID, prefi
446446
internal += time.Since(istart)
447447
}
448448
if iter.Err != nil {
449+
// Trie errors should never happen. Still, in case of a bug, expose the
450+
// error here, as the outer code will presume errors are interrupts, not
451+
// some deeper issues.
452+
log.Error("State snapshotter failed to iterate trie", "err", err)
449453
return false, nil, iter.Err
450454
}
451455
// Delete all stale snapshot states remaining

0 commit comments

Comments
 (0)