Documentation ¶
Overview ¶
Package consensus implements different Cypherium consensus engines.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine interface { // SealCandidate generates a new candidate with the local miner's seal place on top. SealCandidate(candidate *types.Candidate, stop <-chan struct{}) (*types.Candidate, error) // VerifyCandidate checks whether the crypto seal on a candidate is valid according to // the consensus rules of the given engine. VerifyCandidate(chain types.KeyChainReader, candidate *types.Candidate) error // Prepare initializes the consensus fields of a candidate according to the // rules of a particular engine. The changes are executed inline. PrepareCandidate(chain types.KeyChainReader, candidate *types.Candidate, CommitteeSize int) error // APIs returns the RPC APIs this consensus engine provides. APIs(chain types.ChainReader) []rpc.API CalcKeyBlockDifficulty(chain types.KeyChainReader, time uint64, parent *types.KeyBlockHeader) *big.Int PowMode() uint }
Engine is an algorithm agnostic consensus engine.
Click to show internal directories.
Click to hide internal directories.