Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Voting ¶
type Voting interface { ElectedCandidate() (upstream.UpstreamIntf, uint64, error) NumVoteOfDigest(blockdigest.Digest) int Reset() SetMinHeight(uint64) VoteBy(upstream.UpstreamIntf) }
type VotingImpl ¶
type VotingImpl struct {
// contains filtered or unexported fields
}
func (*VotingImpl) ElectedCandidate ¶
func (v *VotingImpl) ElectedCandidate() (upstream.UpstreamIntf, uint64, error)
ElectedCandidate - get candidate that is most vote
func (*VotingImpl) NumVoteOfDigest ¶
func (v *VotingImpl) NumVoteOfDigest(digest blockdigest.Digest) int
NumVoteOfDigest - number of votest for a digest
func (*VotingImpl) SetMinHeight ¶
func (v *VotingImpl) SetMinHeight(height uint64)
SetMinHeight - set minimum height for vote
func (*VotingImpl) VoteBy ¶
func (v *VotingImpl) VoteBy(candidate upstream.UpstreamIntf)
VoteBy - vote by some upstream
Click to show internal directories.
Click to hide internal directories.