Documentation ¶
Index ¶
- type DPosStatus
- func (d *DPosStatus) AddCandidate(msg types.IMessage) error
- func (d *DPosStatus) AddSuperBlockCount(cycle uint64, signer arry.Address)
- func (d *DPosStatus) CancelCandidate(msg types.IMessage) error
- func (d *DPosStatus) Candidates() (types.ICandidates, error)
- func (d *DPosStatus) CheckMessage(msg types.IMessage) error
- func (d *DPosStatus) Commit() (arry.Hash, error)
- func (d *DPosStatus) Confirmed() (uint64, error)
- func (d *DPosStatus) CycleSupers(cycle uint64) (types.ICandidates, error)
- func (d *DPosStatus) SaveCycle(cycle uint64, supers types.ICandidates)
- func (d *DPosStatus) SetConfirmed(height uint64)
- func (d *DPosStatus) SetTrieRoot(hash arry.Hash) error
- func (d *DPosStatus) SuperBlockCount(cycle uint64, signer arry.Address) uint32
- func (d *DPosStatus) TrieRoot() arry.Hash
- func (d *DPosStatus) Voter(msg types.IMessage) error
- func (d *DPosStatus) Voters() map[arry.Address][]arry.Address
- type IDPosDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DPosStatus ¶
type DPosStatus struct {
// contains filtered or unexported fields
}
func NewDPosStatus ¶
func NewDPosStatus() (*DPosStatus, error)
func (*DPosStatus) AddCandidate ¶
func (d *DPosStatus) AddCandidate(msg types.IMessage) error
func (*DPosStatus) AddSuperBlockCount ¶
func (d *DPosStatus) AddSuperBlockCount(cycle uint64, signer arry.Address)
func (*DPosStatus) CancelCandidate ¶
func (d *DPosStatus) CancelCandidate(msg types.IMessage) error
func (*DPosStatus) Candidates ¶
func (d *DPosStatus) Candidates() (types.ICandidates, error)
func (*DPosStatus) CheckMessage ¶
func (d *DPosStatus) CheckMessage(msg types.IMessage) error
If the current number of candidates is less than or equal to the number of super nodes, it is not allowed to withdraw candidates.
func (*DPosStatus) Confirmed ¶
func (d *DPosStatus) Confirmed() (uint64, error)
func (*DPosStatus) CycleSupers ¶
func (d *DPosStatus) CycleSupers(cycle uint64) (types.ICandidates, error)
func (*DPosStatus) SaveCycle ¶
func (d *DPosStatus) SaveCycle(cycle uint64, supers types.ICandidates)
func (*DPosStatus) SetConfirmed ¶
func (d *DPosStatus) SetConfirmed(height uint64)
func (*DPosStatus) SetTrieRoot ¶
func (d *DPosStatus) SetTrieRoot(hash arry.Hash) error
func (*DPosStatus) SuperBlockCount ¶
func (d *DPosStatus) SuperBlockCount(cycle uint64, signer arry.Address) uint32
func (*DPosStatus) TrieRoot ¶
func (d *DPosStatus) TrieRoot() arry.Hash
type IDPosDB ¶
type IDPosDB interface { SetRoot(hash arry.Hash) error Root() arry.Hash Commit() (arry.Hash, error) CandidatesCount() int Candidates() (*types.Candidates, error) AddCandidate(member *types.Member) CancelCandidate(signer arry.Address) CycleSupers(cycle uint64) (*types.Supers, error) SaveCycle(cycle uint64, supers *types.Supers) Voters() map[arry.Address][]arry.Address Confirmed() (uint64, error) SetConfirmed(uint64) Voter(from, to arry.Address) AddSuperBlockCount(cycle uint64, signer arry.Address) SuperBlockCount(cycle uint64, signer arry.Address) uint32 }
Click to show internal directories.
Click to hide internal directories.