mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
cmd/era: fix iterator error source handling in checkAccumulator
This commit is contained in:
parent
aa37bd063d
commit
d367576093
1 changed files with 3 additions and 3 deletions
|
|
@ -273,11 +273,11 @@ func checkAccumulator(e *era.Era) error {
|
||||||
// accumulation across the entire set and are verified at the end.
|
// accumulation across the entire set and are verified at the end.
|
||||||
for it.Next() {
|
for it.Next() {
|
||||||
// 1) next() walks the block index, so we're able to implicitly verify it.
|
// 1) next() walks the block index, so we're able to implicitly verify it.
|
||||||
if it.Error() != nil {
|
if itErr := it.Error(); itErr != nil {
|
||||||
return fmt.Errorf("error reading block %d: %w", it.Number(), err)
|
return fmt.Errorf("error reading block %d: %w", it.Number(), itErr)
|
||||||
}
|
}
|
||||||
block, receipts, err := it.BlockAndReceipts()
|
block, receipts, err := it.BlockAndReceipts()
|
||||||
if it.Error() != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("error reading block %d: %w", it.Number(), err)
|
return fmt.Errorf("error reading block %d: %w", it.Number(), err)
|
||||||
}
|
}
|
||||||
// 2) recompute tx root and verify against header.
|
// 2) recompute tx root and verify against header.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue