diff options
author | Martin Holst Swende <martin@swende.se> | 2019-04-30 21:42:36 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2019-04-30 21:42:36 +0800 |
commit | 4c90efdf57ce87edf0d855c8cec10525875a6ab1 (patch) | |
tree | bc733d1328110c7570c1fad86834e9e3ad1cfcdf /core | |
parent | befca7e8b0eac00499155c0b9d25814615f0fe24 (diff) | |
download | go-tangerine-4c90efdf57ce87edf0d855c8cec10525875a6ab1.tar go-tangerine-4c90efdf57ce87edf0d855c8cec10525875a6ab1.tar.gz go-tangerine-4c90efdf57ce87edf0d855c8cec10525875a6ab1.tar.bz2 go-tangerine-4c90efdf57ce87edf0d855c8cec10525875a6ab1.tar.lz go-tangerine-4c90efdf57ce87edf0d855c8cec10525875a6ab1.tar.xz go-tangerine-4c90efdf57ce87edf0d855c8cec10525875a6ab1.tar.zst go-tangerine-4c90efdf57ce87edf0d855c8cec10525875a6ab1.zip |
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
Diffstat (limited to 'core')
-rw-r--r-- | core/chain_makers.go | 2 | ||||
-rw-r--r-- | core/state_processor.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/chain_makers.go b/core/chain_makers.go index b80788d19..754b543c7 100644 --- a/core/chain_makers.go +++ b/core/chain_makers.go @@ -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)) diff --git a/core/state_processor.go b/core/state_processor.go index 6f2a45120..bed6a0730 100644 --- a/core/state_processor.go +++ b/core/state_processor.go @@ -76,7 +76,7 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg allLogs = append(allLogs, receipt.Logs...) } // Finalize the block, applying any consensus engine specific extras (e.g. block rewards) - p.engine.Finalize(p.bc, header, statedb, block.Transactions(), block.Uncles(), receipts) + p.engine.Finalize(p.bc, header, statedb, block.Transactions(), block.Uncles()) return receipts, allLogs, *usedGas, nil } |