fix unittest

This commit is contained in:
Nguyen Sy Thanh Son 2019-01-12 04:57:34 +00:00
parent 381864d869
commit f8ab12876c

View file

@ -507,8 +507,10 @@ func (bc *BlockChain) insert(block *types.Block) {
bc.currentBlock.Store(block) bc.currentBlock.Store(block)
// save cache BlockSigners // save cache BlockSigners
engine := bc.Engine().(*posv.Posv) if bc.chainConfig.Posv != nil {
engine.CacheData(block.Header(), block.Transactions(), bc.GetReceiptsByHash(block.Hash())) engine := bc.Engine().(*posv.Posv)
engine.CacheData(block.Header(), block.Transactions(), bc.GetReceiptsByHash(block.Hash()))
}
// If the block is better than our head or is on a different chain, force update heads // If the block is better than our head or is on a different chain, force update heads
if updateHeads { if updateHeads {