mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
move cache data to insert func
This commit is contained in:
parent
1ff0fd2cff
commit
88fa30a4ea
1 changed files with 4 additions and 0 deletions
|
|
@ -506,6 +506,10 @@ func (bc *BlockChain) insert(block *types.Block) {
|
|||
}
|
||||
bc.currentBlock.Store(block)
|
||||
|
||||
// save cache BlockSigners
|
||||
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 updateHeads {
|
||||
bc.hc.SetCurrentHeader(block.Header())
|
||||
|
|
|
|||
Loading…
Reference in a new issue