aboutsummaryrefslogtreecommitdiffstats
path: root/consensus/consensus.go
diff options
context:
space:
mode:
authorMartin Holst Swende <martin@swende.se>2019-04-30 21:42:36 +0800
committerPéter Szilágyi <peterke@gmail.com>2019-04-30 21:42:36 +0800
commit4c90efdf57ce87edf0d855c8cec10525875a6ab1 (patch)
treebc733d1328110c7570c1fad86834e9e3ad1cfcdf /consensus/consensus.go
parentbefca7e8b0eac00499155c0b9d25814615f0fe24 (diff)
downloadgo-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 'consensus/consensus.go')
-rw-r--r--consensus/consensus.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/consensus/consensus.go b/consensus/consensus.go
index 487b07be7..f753af550 100644
--- a/consensus/consensus.go
+++ b/consensus/consensus.go
@@ -80,10 +80,19 @@ type Engine interface {
Prepare(chain ChainReader, header *types.Header) error
// Finalize runs any post-transaction state modifications (e.g. block rewards)
- // and assembles the final block.
+ // but does not assemble the block.
+ //
// Note: The block header and state database might be updated to reflect any
// consensus rules that happen at finalization (e.g. block rewards).
Finalize(chain ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction,
+ uncles []*types.Header)
+
+ // FinalizeAndAssemble runs any post-transaction state modifications (e.g. block
+ // rewards) and assembles the final block.
+ //
+ // Note: The block header and state database might be updated to reflect any
+ // consensus rules that happen at finalization (e.g. block rewards).
+ FinalizeAndAssemble(chain ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction,
uncles []*types.Header, receipts []*types.Receipt) (*types.Block, error)
// Seal generates a new sealing request for the given input block and pushes