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

@ -956,7 +956,7 @@ func (w *worker) commit(uncles []*types.Header, interval func(), update bool, st
*receipts[i] = *l
}
s := w.current.state.Copy()
block, err := w.engine.Finalize(w.chain, w.current.header, s, w.current.txs, uncles, w.current.receipts)
block, err := w.engine.FinalizeAndAssemble(w.chain, w.current.header, s, w.current.txs, uncles, w.current.receipts)
if err != nil {
return err
}