aboutsummaryrefslogtreecommitdiffstats
path: root/consensus/consensus.go
diff options
context:
space:
mode:
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