Documentation
¶
Index ¶
- Constants
- Variables
- func NewNominateValue() nominateValue
- func NewRevokeValue() revokeValue
- func NewSchedule(xconfig *tdposConfig, log logs.Logger, ledger cctx.LedgerRely, ...) *tdposSchedule
- func NewTdposConsensus(cCtx cctx.ConsensusCtx, cCfg def.ConsensusConfig) base.ConsensusImplInterface
- func NewvoteValue() voteValue
- func ParseConsensusStorage(block cctx.BlockInterface) (interface{}, error)
- type TdposStatus
- type ValidatorsInfo
Constants ¶
View Source
const ( MAXSLEEPTIME = 1000 MAXMAPSIZE = 1000 MAXHISPROPOSERSSIZE = 100 NOMINATETYPE = "nominate" VOTETYPE = "vote" )
Variables ¶
Functions ¶
func NewNominateValue ¶
func NewNominateValue() nominateValue
func NewRevokeValue ¶
func NewRevokeValue() revokeValue
func NewSchedule ¶
func NewSchedule(xconfig *tdposConfig, log logs.Logger, ledger cctx.LedgerRely, startHeight int64) *tdposSchedule
NewSchedule 新建schedule实例
func NewTdposConsensus ¶
func NewTdposConsensus(cCtx cctx.ConsensusCtx, cCfg def.ConsensusConfig) base.ConsensusImplInterface
func NewvoteValue ¶
func NewvoteValue() voteValue
func ParseConsensusStorage ¶
func ParseConsensusStorage(block cctx.BlockInterface) (interface{}, error)
Types ¶
type TdposStatus ¶
type TdposStatus struct {
Name string
Version int64 `json:"version"`
StartHeight int64 `json:"startHeight"`
Index int `json:"index"`
// contains filtered or unexported fields
}
tdposStatus 实现了ConsensusStatus接口
func (*TdposStatus) GetConsensusBeginInfo ¶
func (t *TdposStatus) GetConsensusBeginInfo() int64
func (*TdposStatus) GetCurrentValidatorsInfo ¶
func (t *TdposStatus) GetCurrentValidatorsInfo() []byte
获取当前矿工信息
func (*TdposStatus) GetStepConsensusIndex ¶
func (t *TdposStatus) GetStepConsensusIndex() int
获取共识item所在consensus slice中的index
Click to show internal directories.
Click to hide internal directories.