diff --git a/core/blockchain.go b/core/blockchain.go index e6aedc143c39..f3cf58bdcc0b 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -684,7 +684,9 @@ func (bc *BlockChain) insert(block *types.Block, writeBlock bool) { // Add the block to the canonical chain number scheme and mark as the head rawdb.WriteCanonicalHash(bc.db, block.Hash(), block.NumberU64()) rawdb.WriteHeadBlockHash(bc.db, block.Hash()) - rawdb.WriteBlock(bc.db, block) + if writeBlock { + rawdb.WriteBlock(bc.db, block) + } bc.currentBlock.Store(block) // save cache BlockSigners