core: fixed head write on block insertion
Due to a rebase this probably got overlooked / ignored. This fixes the issue of a block insertion never writing the last block.
This commit is contained in:
@ -297,6 +297,9 @@ func (bc *BlockChain) insert(block *types.Block) {
|
||||
if err := WriteCanonicalHash(bc.chainDb, block.Hash(), block.NumberU64()); err != nil {
|
||||
glog.Fatalf("failed to insert block number: %v", err)
|
||||
}
|
||||
if err := WriteHeadBlockHash(bc.chainDb, block.Hash()); err != nil {
|
||||
glog.Fatalf("failed to insert block number: %v", err)
|
||||
}
|
||||
bc.currentBlock = block
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user