Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ICommittee ¶
type ICommittee interface {
IP2P
GetValidatorList() []message.PubKey
GetValidator(key message.PubKey) IPubValidator
IsValidator(key message.PubKey) bool
TotalVotingPower() int64
GetValidatorNum() int
GetCurrentProposer(round int) message.PubKey
// DecidesProposal decides what will be proposed if this validator is the current
// proposer.
DecidesProposal() message.ProposedData
// ValidateProposed validates the proposed data
ValidateProposal(data message.ProposedData) bool
// Commit defines the actions the users taken when consensus is reached
// @commitRecords is the +2/3 maj evidence generated by the validator
Commit(commitRecords *message.Commit) error
GetAppState() *message.AppState
GetCommitHistory(height int64) *message.Commit
}
ICommittee represents a validator group which contains all validators at a certain height.
type IP2P ¶
type IP2P interface {
// BroadCast sends msg to other validators
BroadCast(msg message.ConsensusMessage) error
Send(msg message.ConsensusMessage, p IPeer) error
}
type IPrivValidator ¶
IPrivValidator signs a message
Click to show internal directories.
Click to hide internal directories.