dpos_status

package
v0.2.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2020 License: ISC Imports: 6 Imported by: 0

Documentation

Index

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) Commit

func (d *DPosStatus) Commit() (arry.Hash, error)

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

func (*DPosStatus) Voter

func (d *DPosStatus) Voter(msg types.IMessage) error

func (*DPosStatus) Voters

func (d *DPosStatus) Voters() map[arry.Address][]arry.Address

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL