diff --git a/core/blockchain.go b/core/blockchain.go index 54ca6d33d4..3d11f912b3 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1340,7 +1340,7 @@ func (bc *BlockChain) insertSidechain(it *insertIterator) (int, []interface{}, [ numbers []uint64 ) parent := bc.GetHeader(it.previous().Hash(), it.previous().NumberU64()) - for parent != nil && !bc.HasState(parent.Root) { + for parent != nil && rawdb.ReadCanonicalHash(bc.db, parent.Number.Uint64()) != parent.Hash() { hashes = append(hashes, parent.Hash()) numbers = append(numbers, parent.Number.Uint64())