Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Blockchain ¶
type Broadcaster ¶
type Broadcaster[M Message[V, H, A], V Hashable[H], H Hash, A Addr] interface { // Broadcast will broadcast the message to the whole validator set. The function should not be blocking. Broadcast(M) // SendMsg would send a message to a specific validator. This would be required for helping send resquest and // response message to help a specifc validator to catch up. SendMsg(A, M) }
type Broadcasters ¶
type Broadcasters[V Hashable[H], H Hash, A Addr] struct { ProposalBroadcaster Broadcaster[Proposal[V, H, A], V, H, A] PrevoteBroadcaster Broadcaster[Prevote[H, A], V, H, A] PrecommitBroadcaster Broadcaster[Precommit[H, A], V, H, A] }
type Tendermint ¶
func New ¶
func New[V Hashable[H], H Hash, A Addr](nodeAddr A, app Application[V, H], chain Blockchain[V, H, A], vals Validators[A], listeners Listeners[V, H, A], broadcasters Broadcasters[V, H, A], tmPropose, tmPrevote, tmPrecommit timeoutFn, ) *Tendermint[V, H, A]
func (*Tendermint[_, _, _]) OnTimeoutPrecommit ¶
func (t *Tendermint[_, _, _]) OnTimeoutPrecommit(h height, r round)
func (*Tendermint[_, H, A]) OnTimeoutPrevote ¶
func (t *Tendermint[_, H, A]) OnTimeoutPrevote(h height, r round)
func (*Tendermint[_, H, A]) OnTimeoutPropose ¶
func (t *Tendermint[_, H, A]) OnTimeoutPropose(h height, r round)
func (*Tendermint[V, H, A]) Start ¶
func (t *Tendermint[V, H, A]) Start()
func (*Tendermint[V, H, A]) Stop ¶
func (t *Tendermint[V, H, A]) Stop()
type Validators ¶
type Validators[A Addr] interface { // TotalVotingPower represents N which is required to calculate the thresholds. TotalVotingPower(height) votingPower // ValidatorVotingPower returns the voting power of the a single validator. This is also required to implement // various thresholds. The assumption is that a single validator cannot have voting power more than f. ValidatorVotingPower(A) votingPower // Proposer returns the proposer of the current round and height. Proposer(height, round) A }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.