aboutsummaryrefslogtreecommitdiffstats
path: root/core/blockchain.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/blockchain.go')
-rw-r--r--core/blockchain.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/core/blockchain.go b/core/blockchain.go
index ee1c0702b..d173b2de2 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -445,11 +445,7 @@ func (bc *BlockChain) repair(head **types.Block) error {
return nil
}
// 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())
- }
- (*head) = block
+ (*head) = bc.GetBlock((*head).ParentHash(), (*head).NumberU64()-1)
}
}