Documentation ¶
Index ¶
- Variables
- func CalcDifficulty(config *params.ChainConfig, time uint64, parent *types.Header) *big.Int
- type 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) 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) 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
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FrontierBlockReward = big.NewInt(5e+18) // Block reward in wei for successfully mining a block ByzantiumBlockReward = big.NewInt(3e+18) // Block reward in wei for successfully mining a block upward from Byzantium ConstantinopleBlockReward = big.NewInt(2e+18) // Block reward in wei for successfully mining a block upward from Constantinople )
Ethash proof-of-work protocol constants.
Functions ¶
func CalcDifficulty ¶
CalcDifficulty is the difficulty adjustment algorithm. It returns the difficulty that a new block should have when created at time given the parent block's time and difficulty.
Types ¶
type Ethash ¶
type Ethash struct{}
func (*Ethash) CalcDifficulty ¶
func (ethash *Ethash) CalcDifficulty(chain consensus.ChainHeaderReader, time uint64, parent *types.Header) *big.Int
CalcDifficulty is the difficulty adjustment algorithm. It returns the difficulty that a new block should have when created at time given the parent block's time and difficulty.
func (*Ethash) FinalizeAndAssemble ¶
func (*Ethash) VerifyHeader ¶
func (*Ethash) VerifyHeaders ¶
func (*Ethash) VerifyUncles ¶
Click to show internal directories.
Click to hide internal directories.