aboutsummaryrefslogtreecommitdiffstats
path: root/consensus/consensus.go
diff options
context:
space:
mode:
authorgary rong <garyrong0905@gmail.com>2018-08-28 21:59:05 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-08-28 21:59:05 +0800
commitc1c003e4ff36c22d67662ca661fc78cde850d401 (patch)
treeb8bea54350fb6894cfd63ebc87a164acc3fba7e6 /consensus/consensus.go
parent63352bf4247f05d8ef255ff8c63290225c3bc671 (diff)
downloaddexon-c1c003e4ff36c22d67662ca661fc78cde850d401.tar.gz
dexon-c1c003e4ff36c22d67662ca661fc78cde850d401.tar.zst
dexon-c1c003e4ff36c22d67662ca661fc78cde850d401.zip
consensus, miner: stale block mining support (#17506)
* consensus, miner: stale block supporting * consensus, miner: refactor seal signature * cmd, consensus, eth: add miner noverify flag * cmd, consensus, miner: polish
Diffstat (limited to 'consensus/consensus.go')
-rw-r--r--consensus/consensus.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/consensus/consensus.go b/consensus/consensus.go
index 27799f13c..12ede7ff4 100644
--- a/consensus/consensus.go
+++ b/consensus/consensus.go
@@ -86,9 +86,12 @@ type Engine interface {
Finalize(chain ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction,
uncles []*types.Header, receipts []*types.Receipt) (*types.Block, error)
- // Seal generates a new block for the given input block with the local miner's
- // seal place on top.
- Seal(chain ChainReader, block *types.Block, stop <-chan struct{}) (*types.Block, error)
+ // Seal generates a new sealing request for the given input block and pushes
+ // the result into the given channel.
+ //
+ // Note, the method returns immediately and will send the result async. More
+ // than one result may also be returned depending on the consensus algorothm.
+ Seal(chain ChainReader, block *types.Block, results chan<- *types.Block, stop <-chan struct{}) error
// SealHash returns the hash of a block prior to it being sealed.
SealHash(header *types.Header) common.Hash