From ea9bc8a8a4f3221cdba6d8bcf7e3c0e2da862307 Mon Sep 17 00:00:00 2001 From: Franklin Date: Wed, 21 Nov 2018 19:38:45 +0800 Subject: [PATCH] make error a bit shorter --- core/blockchain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/blockchain.go b/core/blockchain.go index ee1c0702b5..dd31b9b3a4 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -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 }