Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbstractBlockBuilder ¶
type AbstractBlockBuilder interface {
BuildWaitPackBlock(coinbaseAddr common.Address) model.AbstractBlock
}
type BftBlockBuilder ¶
type BftBlockBuilder struct {
//nodeContext NodeContext
ModelConfig
}
func MakeBftBlockBuilder ¶
func MakeBftBlockBuilder(config ModelConfig) *BftBlockBuilder
context must have chainReader state_processor.ChainReader, stateProcessorBuilder stateProcessorBuilder, accountStorage state_processor.StateStorage, txPool txPool
func (*BftBlockBuilder) BuildWaitPackBlock ¶
func (builder *BftBlockBuilder) BuildWaitPackBlock(coinbaseAddr common.Address) model.AbstractBlock
build the wait-pack block
func (*BftBlockBuilder) GetDifficulty ¶
func (builder *BftBlockBuilder) GetDifficulty() common.Difficulty
type Chain ¶
type Chain interface {
CurrentBlock() model.AbstractBlock
GetBlockByNumber(number uint64) model.AbstractBlock
GetVerifiers(round uint64) []common.Address
StateAtByBlockNumber(num uint64) (*state_processor.AccountStateDB, error)
IsChangePoint(block model.AbstractBlock, isProcessPackageBlock bool) bool
GetLastChangePoint(block model.AbstractBlock) *uint64
GetSlot(block model.AbstractBlock) *uint64
GetSeenCommit(height uint64) []model.AbstractVerification
GetLatestNormalBlock() model.AbstractBlock
BlockProcessor(root common.Hash) (*chain.BlockProcessor, error)
BuildRegisterProcessor(preRoot common.Hash) (*registerdb.RegisterDB, error)
GetEconomyModel() economy_model.EconomyModel
}
type ModelConfig ¶
Click to show internal directories.
Click to hide internal directories.