cmd/era: remove redundant error check

This commit is contained in:
Bosul Mun 2026-05-01 12:00:47 +02:00 committed by GitHub
parent 6a21d34a24
commit 9c23d32fe3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -337,9 +337,6 @@ 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 {
return fmt.Errorf("error reading block %d: %w", it.Number(), it.Error())
}
block, receipts, err := it.BlockAndReceipts() block, receipts, err := it.BlockAndReceipts()
if err != 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)