Versions in this module Expand all Collapse all v1 v1.10.16 Jun 3, 2022 Changes in this version + var ByzantiumBlockReward = big.NewInt(3e+18) + var ConstantinopleBlockReward = big.NewInt(2e+18) + var DynamicDifficultyCalculator = makeDifficultyCalculator + var ErrInvalidDumpMagic = errors.New("invalid dump magic") + var FrontierBlockReward = big.NewInt(5e+18) + var FrontierDifficultyCalulator = calcDifficultyFrontier + var HomesteadDifficultyCalulator = calcDifficultyHomestead + func CalcDifficulty(config *params.ChainConfig, time uint64, parent *types.Header) *big.Int + func CalcDifficultyFrontierU256(time uint64, parent *types.Header) *big.Int + func CalcDifficultyHomesteadU256(time uint64, parent *types.Header) *big.Int + func MakeCache(block uint64, dir string) + func MakeDataset(block uint64, dir string) + func MakeDifficultyCalculatorU256(bombDelay *big.Int) func(time uint64, parent *types.Header) *big.Int + func SeedHash(block uint64) []byte + type API struct + func (api *API) GetHashrate() uint64 + func (api *API) GetWork() ([4]string, error) + func (api *API) SubmitHashrate(rate hexutil.Uint64, id common.Hash) bool + func (api *API) SubmitWork(nonce types.BlockNonce, hash, digest common.Hash) bool + type Config struct + CacheDir string + CachesInMem int + CachesLockMmap bool + CachesOnDisk int + DatasetDir string + DatasetsInMem int + DatasetsLockMmap bool + DatasetsOnDisk int + Log log.Logger + NotifyFull bool + PowMode Mode + type Ethash struct + func New(config Config, notify []string, noverify bool) *Ethash + func NewFakeDelayer(delay time.Duration) *Ethash + func NewFakeFailer(fail uint64) *Ethash + func NewFaker() *Ethash + func NewFullFaker() *Ethash + func NewShared() *Ethash + func NewTester(notify []string, noverify bool) *Ethash + func (ethash *Ethash) APIs(chain consensus.ChainHeaderReader) []rpc.API + func (ethash *Ethash) Author(header *types.Header) (common.Address, error) + func (ethash *Ethash) CalcDifficulty(chain consensus.ChainHeaderReader, time uint64, parent *types.Header) *big.Int + func (ethash *Ethash) Close() error + func (ethash *Ethash) Finalize(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, ...) + func (ethash *Ethash) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, ...) (*types.Block, error) + func (ethash *Ethash) Hashrate() float64 + func (ethash *Ethash) Prepare(chain consensus.ChainHeaderReader, header *types.Header) error + func (ethash *Ethash) Seal(chain consensus.ChainHeaderReader, block *types.Block, ...) error + func (ethash *Ethash) SealHash(header *types.Header) (hash common.Hash) + func (ethash *Ethash) SetThreads(threads int) + func (ethash *Ethash) Threads() int + func (ethash *Ethash) VerifyHeader(chain consensus.ChainHeaderReader, header *types.Header, seal bool) error + func (ethash *Ethash) VerifyHeaders(chain consensus.ChainHeaderReader, headers []*types.Header, seals []bool) (chan<- struct{}, <-chan error) + func (ethash *Ethash) VerifyUncles(chain consensus.ChainReader, block *types.Block) error + type Mode uint + const ModeFake + const ModeFullFake + const ModeNormal + const ModeShared + const ModeTest