Skip to content

Commit

Permalink
core: return error if repair block failed (ethereum#18126)
Browse files Browse the repository at this point in the history
* core: return error if repair block failed

* make error a bit shorter
  • Loading branch information
mrFranklin authored and cryptomental committed Jan 9, 2019
1 parent dcc693b commit 52ca0a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ func (bc *BlockChain) repair(head **types.Block) error {
// Otherwise rewind one block and recheck state availability there
block := bc.GetBlock((*head).ParentHash(), (*head).NumberU64()-1)
if block == nil {
return fmt.Errorf("failed to repair block, can not get block at height %d", (*head).NumberU64())
return fmt.Errorf("missing block %d [%x]", (*head).NumberU64()-1, (*head).ParentHash())
}
(*head) = block
}
Expand Down

0 comments on commit 52ca0a4

Please sign in to comment.