Skip to content

Commit

Permalink
Revert "cmd/utils: report the blocknumber when block import fails (et…
Browse files Browse the repository at this point in the history
…hereum#27213)"

This reverts commit c62da24.
  • Loading branch information
mohammadfarari1360 authored May 25, 2023
1 parent 21c87e0 commit c4d4c19
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions cmd/utils/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,8 @@ func ImportChain(chain *core.BlockChain, fn string) error {
log.Info("Skipping batch as all blocks present", "batch", batch, "first", blocks[0].Hash(), "last", blocks[i-1].Hash())
continue
}
if failindex, err := chain.InsertChain(missing); err != nil {
var failnumber uint64
if failindex > 0 && failindex < len(missing) {
failnumber = missing[failindex].NumberU64()
} else {
failnumber = missing[0].NumberU64()
}
return fmt.Errorf("invalid block %d: %v", failnumber, err)
if _, err := chain.InsertChain(missing); err != nil {
return fmt.Errorf("invalid block %d: %v", n, err)
}
}
return nil
Expand Down

0 comments on commit c4d4c19

Please sign in to comment.