Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseAbciQueryResponse ¶
type BaseAbciQueryResponse struct {
Result *coretypes.ResultABCIQuery `json:"result"`
}
func (*BaseAbciQueryResponse) GetBuffer ¶
func (re *BaseAbciQueryResponse) GetBuffer() ([]byte, error)
func (*BaseAbciQueryResponse) GetError ¶
func (re *BaseAbciQueryResponse) GetError() error
type BaseRpcResponse ¶
type BaseRpcResponse[T any] struct { Error *BaseRpcResponseError `json:"error"` Result *T `json:"result"` }
type BaseRpcResponseError ¶
func (*BaseRpcResponseError) GetError ¶
func (re *BaseRpcResponseError) GetError() error
type LightValidator ¶
type LightValidator struct { Index int // index in the validator set returned by RPC '/validators' Moniker string Address string PubKey string VotingPower int64 VotingPowerDisplayPercent float64 // the value is rounded so only use for display purpose }
LightValidator is a light version of Validator, it contains minimal information needed for application business logic.
func (LightValidator) GetFingerPrintAddress ¶
func (lv LightValidator) GetFingerPrintAddress() string
GetFingerPrintAddress returns the first 6 bytes of the address. Tendermint/CometBFT is using this to identify the validator in pre-(commit)-votes.
type LightValidators ¶
type LightValidators []LightValidator
LightValidators is a list of LightValidator.
CONTRACT: must maintain the same order as the result from the RPC server.
func (LightValidators) GetLightValidatorByIndex ¶
func (lvs LightValidators) GetLightValidatorByIndex(index int) LightValidator
func (LightValidators) TotalVotingPower ¶
func (lvs LightValidators) TotalVotingPower() uint64
type RoundState ¶
type RoundState struct { HeightRoundStep string `json:"height/round/step"` StartTime time.Time `json:"start_time"` Votes []RoundVotes `json:"height_vote_set"` }
func (RoundState) GetPreCommitPercent ¶
func (rs RoundState) GetPreCommitPercent(round int) (percent float64, err error)
func (RoundState) GetPreVotePercent ¶
func (rs RoundState) GetPreVotePercent(round int) (percent float64, err error)
func (RoundState) GetRound ¶
func (rs RoundState) GetRound() (round int, err error)
type RoundStateResponse ¶
type RoundStateResponse struct {
RoundState *RoundState `json:"round_state"`
}
type RoundVotes ¶
type ValidatorVoteState ¶
type ValidatorVoteState struct { Validator LightValidator VotingBlockHash string // 6 bytes fingerprint of hash of the block that the validator voted for PreVoted bool VotedZeroes bool PreCommitVoted bool }
Click to show internal directories.
Click to hide internal directories.