Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
NodeID string
CurrentSlot uint64
Validator Validator
Combiner Combiner
Ledger Ledger
SlotsLoader SlotsLoader
QuorumSlices []*QuorumSlice
}
type Consensus ¶
type Consensus struct {
// contains filtered or unexported fields
}
func (*Consensus) InputMessage ¶
func (*Consensus) OutputMessage ¶
type Message ¶
type Message struct {
Type MessageType
SlotIndex uint64
NodeID string
Counter uint32
Value
}
type MessageType ¶
type MessageType int
const ( VoteNominate MessageType = iota + 1 AcceptNominate VotePrepare AcceptPrepare VoteCommit AcceptCommit )
type QuorumSlice ¶
type QuorumSlice struct {
Threshold uint32
Validators map[string]struct{}
InnerSlices []*QuorumSlice
}
type SlotsLoader ¶
Click to show internal directories.
Click to hide internal directories.