Documentation ¶
Index ¶
- Variables
- func CalcBaseFee(config *params.ChainConfig, parent *types.Header, timestamp uint64) ([]byte, *big.Int, error)
- type ConsensusCallbacks
- type DummyEngine
- func (self *DummyEngine) APIs(chain consensus.ChainHeaderReader) (res []rpc.API)
- func (self *DummyEngine) Author(header *types.Header) (common.Address, error)
- func (self *DummyEngine) CalcDifficulty(chain consensus.ChainHeaderReader, time uint64, parent *types.Header) *big.Int
- func (self *DummyEngine) Close() error
- func (self *DummyEngine) ExtraStateChange(block *types.Block, statedb *state.StateDB) error
- func (self *DummyEngine) Finalize(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, ...) error
- func (self *DummyEngine) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, ...) (*types.Block, error)
- func (self *DummyEngine) Prepare(chain consensus.ChainHeaderReader, header *types.Header) error
- func (self *DummyEngine) VerifyHeader(chain consensus.ChainHeaderReader, header *types.Header) error
- func (self *DummyEngine) VerifySeal(chain consensus.ChainHeaderReader, header *types.Header) error
- func (self *DummyEngine) VerifyUncles(chain consensus.ChainReader, block *types.Block) error
- type OnAPIsCallbackType
- type OnExtraStateChangeType
- type OnFinalizeAndAssembleCallbackType
- type OnFinalizeCallbackType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MaxBaseFee = big.NewInt(params.ApricotPhase3MaxBaseFee) MinBaseFee = big.NewInt(params.ApricotPhase3MinBaseFee) TargetGas uint64 = 10_000_000 BlockGasFee uint64 = 1_000_000 )
Functions ¶
func CalcBaseFee ¶ added in v0.6.0
func CalcBaseFee(config *params.ChainConfig, parent *types.Header, timestamp uint64) ([]byte, *big.Int, error)
CalcBaseFee takes the previous header and the timestamp of its child block and calculates the expected base fee as well as the encoding of the past pricing information for the child block. CalcBaseFee should only be called if [timestamp] >= [config.ApricotPhase3Timestamp]
Types ¶
type ConsensusCallbacks ¶
type ConsensusCallbacks struct { OnAPIs OnAPIsCallbackType OnFinalize OnFinalizeCallbackType OnFinalizeAndAssemble OnFinalizeAndAssembleCallbackType OnExtraStateChange OnExtraStateChangeType }
type DummyEngine ¶
type DummyEngine struct {
// contains filtered or unexported fields
}
func NewDummyEngine ¶
func NewDummyEngine(cb *ConsensusCallbacks) *DummyEngine
func NewFaker ¶ added in v0.6.0
func NewFaker() *DummyEngine
func (*DummyEngine) APIs ¶
func (self *DummyEngine) APIs(chain consensus.ChainHeaderReader) (res []rpc.API)
func (*DummyEngine) CalcDifficulty ¶
func (self *DummyEngine) CalcDifficulty(chain consensus.ChainHeaderReader, time uint64, parent *types.Header) *big.Int
func (*DummyEngine) Close ¶
func (self *DummyEngine) Close() error
func (*DummyEngine) ExtraStateChange ¶ added in v0.2.12
func (*DummyEngine) Finalize ¶
func (self *DummyEngine) Finalize( chain consensus.ChainHeaderReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, receipts []*types.Receipt, uncles []*types.Header) error
func (*DummyEngine) FinalizeAndAssemble ¶
func (*DummyEngine) Prepare ¶
func (self *DummyEngine) Prepare(chain consensus.ChainHeaderReader, header *types.Header) error
func (*DummyEngine) VerifyHeader ¶
func (self *DummyEngine) VerifyHeader(chain consensus.ChainHeaderReader, header *types.Header) error
func (*DummyEngine) VerifySeal ¶
func (self *DummyEngine) VerifySeal(chain consensus.ChainHeaderReader, header *types.Header) error
func (*DummyEngine) VerifyUncles ¶
func (self *DummyEngine) VerifyUncles(chain consensus.ChainReader, block *types.Block) error
type OnAPIsCallbackType ¶
type OnAPIsCallbackType = func(consensus.ChainHeaderReader) []rpc.API
type OnExtraStateChangeType ¶ added in v0.2.12
type OnFinalizeCallbackType ¶
Click to show internal directories.
Click to hide internal directories.