mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
documentation: update consensus interface doc
This commit is contained in:
parent
ca22d0761b
commit
8b72a9d02d
2 changed files with 5 additions and 2 deletions
|
|
@ -137,8 +137,9 @@ var (
|
|||
errRecentlySigned = errors.New("recently signed")
|
||||
)
|
||||
|
||||
// SignerFn is a signer callback function to request a header to be signed by a
|
||||
// backing account.
|
||||
// SignerFn hashes and signs the data to be signed by a backing account. It should point to the
|
||||
// accounts.Wallet.SignData method.
|
||||
// The function arguments are: current address, mimeType and data to be hashed and signed.
|
||||
type SignerFn func(accounts.Account, string, []byte) ([]byte, error)
|
||||
|
||||
// ecrecover extracts the Ethereum account address from a signed header.
|
||||
|
|
|
|||
|
|
@ -100,6 +100,8 @@ type Engine interface {
|
|||
//
|
||||
// Note, the method returns immediately and will send the result async. More
|
||||
// than one result may also be returned depending on the consensus algorithm.
|
||||
// Stop is triggered by closing the @stop channel hence, any receive from
|
||||
// @stop will succeed without blocking.
|
||||
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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue