Documentation
¶
Index ¶
- type Beacon
- func (beacon *Beacon) APIs(chain consensus.ChainHeaderReader) []rpc.API
- func (beacon *Beacon) Author(header *types.Header) (common.Address, error)
- func (beacon *Beacon) Close() error
- func (beacon *Beacon) Finalize(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, ...)
- func (beacon *Beacon) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, ...) (*types.Block, error)
- func (beacon *Beacon) VerifyHeader(chain consensus.ChainHeaderReader, header *types.Header) error
- func (beacon *Beacon) VerifyHeaders(chain consensus.ChainHeaderReader, headers []*types.Header) (chan<- struct{}, <-chan error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Beacon ¶
type Beacon struct {
// contains filtered or unexported fields
}
Beacon is a consensus engine that uses the proof-of-stake algorithm.
func NewFakeDelayer ¶ added in v0.2.0
func NewFakeFailer ¶ added in v0.2.0
func NewFullFaker ¶ added in v0.2.0
func NewFullFaker() *Beacon
func (*Beacon) APIs ¶
func (beacon *Beacon) APIs(chain consensus.ChainHeaderReader) []rpc.API
APIs implements consensus.Engine, returning the user facing RPC APIs.
func (*Beacon) Author ¶
Author implements consensus.Engine, returning the verified author of the block.
func (*Beacon) Finalize ¶
func (beacon *Beacon) Finalize(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, body *types.Body)
Finalize implements consensus.Engine and processes withdrawals on top.
func (*Beacon) FinalizeAndAssemble ¶
func (beacon *Beacon) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, body *types.Body, receipts []*types.Receipt) (*types.Block, error)
FinalizeAndAssemble implements consensus.Engine, setting the final state and assembling the block.
func (*Beacon) VerifyHeader ¶
VerifyHeader checks whether a header conforms to the consensus rules of the stock Zond consensus engine.
func (*Beacon) VerifyHeaders ¶
func (beacon *Beacon) VerifyHeaders(chain consensus.ChainHeaderReader, headers []*types.Header) (chan<- struct{}, <-chan error)
VerifyHeaders is similar to VerifyHeader, but verifies a batch of headers concurrently. The method returns a quit channel to abort the operations and a results channel to retrieve the async verifications. VerifyHeaders expect the headers to be ordered and continuous.