consensus,core,miner: avoid overhead of creating a new block (#19301)

* consensus,core,miner: avoid overhead of creating a new block

* consensus: nitpick dot

* consensus: fix some comment formatting nits
This commit is contained in:
Martin Holst Swende
2019-04-30 15:42:36 +02:00
committed by Péter Szilágyi
parent befca7e8b0
commit 4c90efdf57
6 changed files with 33 additions and 8 deletions

View File

@ -206,7 +206,7 @@ func GenerateChain(config *params.ChainConfig, parent *types.Block, engine conse
}
if b.engine != nil {
// Finalize and seal the block
block, _ := b.engine.Finalize(chainreader, b.header, statedb, b.txs, b.uncles, b.receipts)
block, _ := b.engine.FinalizeAndAssemble(chainreader, b.header, statedb, b.txs, b.uncles, b.receipts)
// Write state changes to db
root, err := statedb.Commit(config.IsEIP158(b.header.Number))