make error a bit shorter

This commit is contained in:
Franklin 2018-11-21 19:38:45 +08:00
parent 24519aed01
commit ea9bc8a8a4

View file

@ -447,7 +447,7 @@ func (bc *BlockChain) repair(head **types.Block) error {
// Otherwise rewind one block and recheck state availability there // Otherwise rewind one block and recheck state availability there
block := bc.GetBlock((*head).ParentHash(), (*head).NumberU64()-1) block := bc.GetBlock((*head).ParentHash(), (*head).NumberU64()-1)
if block == nil { 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 (*head) = block
} }