mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-20 21:54:30 +00:00
core: fix writeBlock
This commit is contained in:
parent
52077f18f3
commit
074095b1d5
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue