Versions in this module Expand all Collapse all v1 v1.10.3 Dec 16, 2024 v1.10.2 Dec 15, 2024 Changes in this version + var ErrCouldNotRetreiveHeaderByNumber = errors.New("could not retrieve header by number") + var ErrInsufficientEpoch = errors.New("insufficient past epochs to compute apr") + var ErrZeroStakeOneEpochAgo = errors.New("zero total delegation one epoch ago") + func ComputeForValidator(bc Reader, block *types.Block, wrapper *staking.ValidatorWrapper) (*numeric.Dec, error) + type Reader interface + Config func() *params.ChainConfig + CurrentHeader func() *block.Header + GetHeader func(hash common.Hash, number uint64) *block.Header + GetHeaderByHash func(hash common.Hash) *block.Header + GetHeaderByNumber func(number uint64) *block.Header + ReadValidatorSnapshotAtEpoch func(epoch *big.Int, addr common.Address) (*staking.ValidatorSnapshot, error)