Versions in this module Expand all Collapse all v1 v1.0.2 Dec 20, 2023 v1.0.1 Dec 19, 2023 Changes in this version + var ErrFutureBlock = errors.New("block in the future") + var ErrInvalidNumber = errors.New("invalid block number") + var ErrInvalidTerminalBlock = errors.New("invalid terminal block") + var ErrPrunedAncestor = errors.New("pruned ancestor") + var ErrUnknownAncestor = errors.New("unknown ancestor") + type ChainHeaderReader interface + Config func() *params.ChainConfig + CurrentHeader func() *types.Header + GetHeader func(hash common.Hash, number uint64) *types.Header + GetHeaderByHash func(hash common.Hash) *types.Header + GetHeaderByNumber func(number uint64) *types.Header + GetTd func(hash common.Hash, number uint64) *big.Int + type ChainReader interface + GetBlock func(hash common.Hash, number uint64) *types.Block + type Engine interface + APIs func(chain ChainHeaderReader) []rpc.API + Author func(header *types.Header) (common.Address, error) + CalcDifficulty func(chain ChainHeaderReader, time uint64, parent *types.Header) *big.Int + Close func() error + Finalize func(chain ChainHeaderReader, header *types.Header, state *state.StateDB, ...) + FinalizeAndAssemble func(chain ChainHeaderReader, header *types.Header, state *state.StateDB, ...) (*types.Block, error) + Prepare func(chain ChainHeaderReader, header *types.Header) error + Seal func(chain ChainHeaderReader, block *types.Block, results chan<- *types.Block, ...) error + SealHash func(header *types.Header) common.Hash + VerifyHeader func(chain ChainHeaderReader, header *types.Header) error + VerifyHeaders func(chain ChainHeaderReader, headers []*types.Header) (chan<- struct{}, <-chan error) + VerifyUncles func(chain ChainReader, block *types.Block) error + type Merger struct + func NewMerger(db ethdb.KeyValueStore) *Merger + func (m *Merger) FinalizePoS() + func (m *Merger) PoSFinalized() bool + func (m *Merger) ReachTTD() + func (m *Merger) TDDReached() bool + type PoW interface + Hashrate func() float64