Versions in this module Expand all Collapse all v0 v0.4.0 Oct 11, 2018 Changes in this version + var ByzantiumBlockReward = big.NewInt(3e+18) + var ConstantinopleBlockReward = big.NewInt(2e+18) + var ErrInvalidDumpMagic = errors.New("invalid dump magic") + var FrontierBlockReward = big.NewInt(5e+18) + func CalcDifficulty(config *params.ChainConfig, time uint64, parent *types.Header) *big.Int + func MakeCache(block uint64, dir string) + func MakeDataset(block uint64, dir string) + func SeedHash(block uint64) []byte + type API struct + func (api *API) GetHashrate() uint64 + func (api *API) GetWork() ([3]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 + CachesOnDisk int + DatasetDir string + DatasetsInMem int + DatasetsOnDisk int + 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.ChainReader) []rpc.API + func (ethash *Ethash) Author(header *types.Header) (common.Address, error) + func (ethash *Ethash) CalcDifficulty(chain consensus.ChainReader, time uint64, parent *types.Header) *big.Int + func (ethash *Ethash) Close() error + func (ethash *Ethash) Finalize(chain consensus.ChainReader, header *types.Header, state *state.StateDB, ...) (*types.Block, error) + func (ethash *Ethash) Hashrate() float64 + func (ethash *Ethash) Prepare(chain consensus.ChainReader, header *types.Header) error + func (ethash *Ethash) Seal(chain consensus.ChainReader, block *types.Block, results chan<- *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.ChainReader, header *types.Header, seal bool) error + func (ethash *Ethash) VerifyHeaders(chain consensus.ChainReader, headers []*types.Header, seals []bool) (chan<- struct{}, <-chan error) + func (ethash *Ethash) VerifySeal(chain consensus.ChainReader, header *types.Header) 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