Versions in this module Expand all Collapse all v3 v3.3.5 May 9, 2020 Changes in this version + var BlockReward = big.NewInt(7e+18) + var ErrIneligibleSigner = errors.New("signer is not eligible to sign this block") + var ErrInvalidTimestamp = errors.New("invalid timestamp") + func CalcDifficulty(lastSigned map[common.Address]uint64, signer common.Address) uint64 + func CliqueRLP(header *types.Header) []byte + func ExtraAppendVote(extra []byte, candidate common.Address, voter bool) []byte + func ExtraCandidate(extra []byte) common.Address + func ExtraEnsureVanity(extra []byte) []byte + func ExtraHasVote(extra []byte) bool + func ExtraIsVoterElection(extra []byte) bool + func ExtraVanity(extra []byte) []byte + func NewFakeDelayer(delay time.Duration) consensus.Engine + func NewFakeFailer(fail uint64) consensus.Engine + func NewFaker() consensus.Engine + func NewFullFaker() consensus.Engine + func SealHash(header *types.Header) (hash common.Hash) + type API struct + func (api *API) Discard(address common.Address) + func (api *API) GetSigners(ctx context.Context, number *rpc.BlockNumber) ([]common.Address, error) + func (api *API) GetSignersAtHash(ctx context.Context, hash common.Hash) ([]common.Address, error) + func (api *API) GetSnapshot(ctx context.Context, number *rpc.BlockNumber) (*Snapshot, error) + func (api *API) GetSnapshotAtHash(ctx context.Context, hash common.Hash) (*Snapshot, error) + func (api *API) GetVoters(ctx context.Context, number *rpc.BlockNumber) ([]common.Address, error) + func (api *API) Proposals() map[common.Address]propose + func (api *API) Propose(address common.Address, auth bool) + func (api *API) ProposeVoter(address common.Address, auth bool) + type Clique struct + func New(config *params.CliqueConfig, db common.Database) *Clique + func (c *Clique) APIs(chain consensus.ChainReader) []rpc.API + func (c *Clique) Author(header *types.Header) (common.Address, error) + func (c *Clique) Authorize(signer common.Address, signFn consensus.SignerFn) + func (c *Clique) Finalize(chain consensus.ChainReader, header *types.Header, state *state.StateDB, ...) *types.Block + func (c *Clique) Prepare(chain consensus.ChainReader, header *types.Header) error + func (c *Clique) Seal(chain consensus.ChainReader, block *types.Block, stop <-chan struct{}) (*types.Block, *time.Time, error) + func (c *Clique) SealHash(header *types.Header) common.Hash + func (c *Clique) VerifyHeader(chain consensus.ChainReader, header *types.Header) error + func (c *Clique) VerifyHeaders(chain consensus.ChainReader, headers []*types.Header) (chan<- struct{}, <-chan error) + type Snapshot struct + Hash common.Hash + Number uint64 + Signers map[common.Address]uint64 + Tally map[common.Address]Tally + Voters map[common.Address]struct{} + Votes []*Vote + type Tally struct + Authorize bool + Votes int + type Vote struct + Address common.Address + Authorize bool + Block uint64 + Signer common.Address Other modules containing this package github.com/beyonderyue/gochain