Versions in this module Expand all Collapse all v0 v0.0.9 Aug 14, 2020 v0.0.9-Bytes01 Aug 18, 2020 v0.0.9-Bytes-0.1 Aug 10, 2020 v0.0.9-Bytes Aug 18, 2020 v0.0.8 Aug 14, 2020 v0.0.7 Aug 11, 2020 v0.0.6 Aug 10, 2020 v0.0.5 Mar 17, 2020 v0.0.5-unstable Aug 11, 2020 v0.0.4 Jan 20, 2020 v0.0.3 Aug 1, 2019 v0.0.2 Jul 17, 2019 v0.0.1 May 31, 2019 Changes in this version + const TimeoutPreCommit + const TimeoutPreVote + const TimeoutPropose + type BasicMessage struct + HeightRound HeightRound + SourceId int + type ChangeStateEvent struct + HeightRound HeightRound + NewStepType StepType + type DefaultPartner struct + CurrentHR HeightRound + F int + N int + Peers []Partner + States map[HeightRound]*HeightRoundState + func NewPartner(nbParticipants int, id int, blockTime time.Duration) *DefaultPartner + func (p *DefaultPartner) Broadcast(messageType MessageType, hr HeightRound, content Proposal, validRound int) + func (p *DefaultPartner) EventLoop() + func (p *DefaultPartner) GetId() int + func (p *DefaultPartner) GetIncomingMessageChannel() chan Message + func (p *DefaultPartner) GetOutgoingMessageChannel() chan Message + func (p *DefaultPartner) GetValue() Proposal + func (p *DefaultPartner) GetWaiterTimeoutChannel() chan *WaiterRequest + func (p *DefaultPartner) OnTimeoutPreCommit(context WaiterContext) + func (p *DefaultPartner) OnTimeoutPreVote(context WaiterContext) + func (p *DefaultPartner) OnTimeoutPropose(context WaiterContext) + func (p *DefaultPartner) Proposer(hr HeightRound) int + func (p *DefaultPartner) SetPeers(peers []Partner) + func (p *DefaultPartner) StartNewEra(height int, round int) + func (p *DefaultPartner) WaitStepTimeout(stepType StepType, timeout time.Duration, hr HeightRound, ...) + func (p *DefaultPartner) WipeOldStates() + type HeightRound struct + Height int + Round int + func (h *HeightRound) IsAfter(o HeightRound) bool + func (h *HeightRound) IsAfterOrEqual(o HeightRound) bool + func (h *HeightRound) IsBefore(o HeightRound) bool + func (h *HeightRound) String() string + type HeightRoundState struct + Decision interface{} + LockedRound int + LockedValue Proposal + MessageProposal *MessageProposal + PreCommits []*MessageCommonVote + PreVotes []*MessageCommonVote + Sources map[int]bool + Step StepType + StepTypeEqualOrLargerPreVoteTriggered bool + StepTypeEqualPreCommitTriggered bool + StepTypeEqualPreVoteTriggered bool + ValidRound int + ValidValue Proposal + func NewHeightRoundState(total int) *HeightRoundState + type Message struct + Payload interface{} + Type MessageType + func (m *Message) String() string + type MessageCommonVote struct + Idv string + type MessageProposal struct + ValidRound int + Value Proposal + type MessageType int + const MessageTypePreCommit + const MessageTypePreVote + const MessageTypeProposal + func (m MessageType) String() string + type Partner interface + EventLoop func() + GetId func() int + GetIncomingMessageChannel func() chan Message + GetOutgoingMessageChannel func() chan Message + GetWaiterTimeoutChannel func() chan *WaiterRequest + SetPeers func(peers []Partner) + StartNewEra func(height int, round int) + type PartnerBase struct + Id int + IncomingMessageChannel chan Message + OutgoingMessageChannel chan Message + WaiterTimeoutChannel chan *WaiterRequest + type Proposal interface + Equal func(Proposal) bool + GetId func() string + type StepType int + const StepTypePreCommit + const StepTypePreVote + const StepTypePropose + func (m StepType) IsAfter(o StepType) bool + func (m StepType) String() string + type StringProposal string + func (s StringProposal) Equal(o Proposal) bool + func (s StringProposal) GetId() string + type TendermintContext struct + HeightRound HeightRound + StepType StepType + func (t *TendermintContext) Equal(w WaiterContext) bool + func (t *TendermintContext) IsAfter(w WaiterContext) bool + type ValueIdMatchType int + const MatchTypeAny + const MatchTypeByValue + const MatchTypeNil + type Waiter struct + func NewWaiter(callbackEventChannel chan *WaiterRequest) *Waiter + func (w *Waiter) StartEventLoop() + func (w *Waiter) UpdateContext(context WaiterContext) + func (w *Waiter) UpdateRequest(req *WaiterRequest) + type WaiterContext interface + Equal func(WaiterContext) bool + IsAfter func(WaiterContext) bool + type WaiterRequest struct + Context WaiterContext + TimeoutCallback func(WaiterContext) + WaitTime time.Duration