Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsensusEngine ¶
type ConsensusEngine interface { // Peer-2-Peer IsListening() bool Listeners() []p2p.Listener NodeInfo() *p2p.NodeInfo Peers() []*Peer // Private Validator PublicValidatorKey() crypto.PubKey // Memory pool BroadcastTransaction(transaction []byte, callback func(*abci_types.Response)) error // Events // For consensus events like NewBlock Events() event.EventEmitter // List pending transactions in the mempool, passing 0 for maxTxs gets an // unbounded number of transactions ListUnconfirmedTxs(maxTxs int) ([]txs.Tx, error) ListValidators() []Validator ConsensusState() *ConsensusState // TODO: Consider creating a real type for PeerRoundState, but at the looks // quite coupled to tendermint PeerConsensusStates() map[string]string // Allow for graceful shutdown of node. Returns whether the node was stopped. Stop() bool }
type ConsensusState ¶
type ConsensusState struct { Height int `json:"height"` Round int `json:"round"` Step uint8 `json:"step"` StartTime time.Time `json:"start_time"` CommitTime time.Time `json:"commit_time"` Validators []Validator `json:"validators"` Proposal *tendermint_types.Proposal `json:"proposal"` }
ConsensusState
func FromRoundState ¶
func FromRoundState(rs *tendermint_consensus.RoundState) *ConsensusState
type Peer ¶
type Peer struct { NodeInfo *p2p.NodeInfo `json:"node_info"` IsOutbound bool `json:"is_outbound"` }
type TendermintValidator ¶
type TendermintValidator struct {
*tendermint_types.Validator `json:"validator"`
}
Anticipating moving to our own definition of Validator, or at least augmenting Tendermint's.
func (*TendermintValidator) Address ¶
func (tendermintValidator *TendermintValidator) Address() []byte
func (*TendermintValidator) AssertIsValidator ¶
func (tendermintValidator *TendermintValidator) AssertIsValidator()
type Validator ¶
type Validator interface { AssertIsValidator() Address() []byte }
func FromTendermintValidators ¶
func FromTendermintValidators(tmValidators []*tendermint_types.Validator) []Validator
Click to show internal directories.
Click to hide internal directories.