Documentation ¶
Index ¶
- func IsConsAddr(address string) bool
- func IsOprAddr(address string) bool
- type ValidatorInfo
- type ValidatorRecord
- func DBRowToValidatorRecord(row database.RowType) ValidatorRecord
- func DBRowToValidatorRecords(row []database.RowType) []ValidatorRecord
- func GetAllValidators() ([]ValidatorRecord, error)
- func GetJoinedAfterGenesisValidators() ([]ValidatorRecord, error)
- func GetValidatorByConsAddr(valConsAddr string) (ValidatorRecord, error)
- func GetValidatorByOprAddr(valOprAddr string) (ValidatorRecord, error)
- func GetValidatorsWithPagination(limitOffset types.DBLimitOffset) ([]ValidatorRecord, types.Pagination, error)
- func (v *ValidatorRecord) GetFirstSignedBlockHeight() (uint64, error)
- func (v *ValidatorRecord) GetFirstSignedBlockHeightWithBegin(beginHeight uint64) (uint64, error)
- func (v *ValidatorRecord) GetLatestSignedBlockHeight() (uint64, error)
- func (v *ValidatorRecord) GetLatestSignedBlockHeightWithEnd(endHeight uint64) (uint64, error)
- func (v *ValidatorRecord) GetTotalSignedBlocks() (uint64, error)
- func (v *ValidatorRecord) GetTotalSignedBlocksWithHeightRange(beginHeight, endHeight uint64) (uint64, error)
- func (v *ValidatorRecord) GetValidatorInfo() (ValidatorInfo, error)
- func (v *ValidatorRecord) GetValidatorInfoByBlockHeightRange(beginHeight, endHeight uint64) (ValidatorInfo, error)
- type ValidatorWithTx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsConsAddr ¶
Types ¶
type ValidatorInfo ¶
type ValidatorInfo struct { ValidatorRecord `json:"validator"` TotalSignedBlocks uint64 `json:"total_signed_blocks"` FirstSignedBlockHeight uint64 `json:"first_signed_block"` UpTime float32 `json:"up_time"` // From the joining block UpTimeAll float32 `json:"up_time_all"` // From the first block }
func GetAllValidatorsWithInfo ¶
func GetAllValidatorsWithInfo() ([]ValidatorInfo, error)
func GetAllValidatorsWithInfoByBlockHeightRange ¶
func GetAllValidatorsWithInfoByBlockHeightRange(beginHeight, endHeight uint64) ([]ValidatorInfo, error)
type ValidatorRecord ¶
type ValidatorRecord struct { ConsAddr string `json:"cons_address"` OprAddr string `json:"opr_address"` AccAddr string `json:"acc_address"` Moniker string `json:"moniker"` }
func DBRowToValidatorRecord ¶
func DBRowToValidatorRecord(row database.RowType) ValidatorRecord
func DBRowToValidatorRecords ¶
func DBRowToValidatorRecords(row []database.RowType) []ValidatorRecord
func GetAllValidators ¶
func GetAllValidators() ([]ValidatorRecord, error)
func GetJoinedAfterGenesisValidators ¶
func GetJoinedAfterGenesisValidators() ([]ValidatorRecord, error)
func GetValidatorByConsAddr ¶
func GetValidatorByConsAddr(valConsAddr string) (ValidatorRecord, error)
func GetValidatorByOprAddr ¶
func GetValidatorByOprAddr(valOprAddr string) (ValidatorRecord, error)
func GetValidatorsWithPagination ¶
func GetValidatorsWithPagination(limitOffset types.DBLimitOffset) ([]ValidatorRecord, types.Pagination, error)
func (*ValidatorRecord) GetFirstSignedBlockHeight ¶
func (v *ValidatorRecord) GetFirstSignedBlockHeight() (uint64, error)
func (*ValidatorRecord) GetFirstSignedBlockHeightWithBegin ¶
func (v *ValidatorRecord) GetFirstSignedBlockHeightWithBegin(beginHeight uint64) (uint64, error)
func (*ValidatorRecord) GetLatestSignedBlockHeight ¶
func (v *ValidatorRecord) GetLatestSignedBlockHeight() (uint64, error)
func (*ValidatorRecord) GetLatestSignedBlockHeightWithEnd ¶
func (v *ValidatorRecord) GetLatestSignedBlockHeightWithEnd(endHeight uint64) (uint64, error)
func (*ValidatorRecord) GetTotalSignedBlocks ¶
func (v *ValidatorRecord) GetTotalSignedBlocks() (uint64, error)
func (*ValidatorRecord) GetTotalSignedBlocksWithHeightRange ¶
func (v *ValidatorRecord) GetTotalSignedBlocksWithHeightRange(beginHeight, endHeight uint64) (uint64, error)
func (*ValidatorRecord) GetValidatorInfo ¶
func (v *ValidatorRecord) GetValidatorInfo() (ValidatorInfo, error)
func (*ValidatorRecord) GetValidatorInfoByBlockHeightRange ¶
func (v *ValidatorRecord) GetValidatorInfoByBlockHeightRange(beginHeight, endHeight uint64) (ValidatorInfo, error)
type ValidatorWithTx ¶
type ValidatorWithTx struct { ValidatorRecord `json:"validator"` TxHash string `json:"tx_hash"` Height uint64 `json:"height"` Sender string `json:"sender"` LogTime time.Time `json:"logtime"` }
func DBRowToValidatorWithTx ¶
func DBRowToValidatorWithTx(row database.RowType) ValidatorWithTx
func DBRowToValidatorWithTxs ¶
func DBRowToValidatorWithTxs(row []database.RowType) []ValidatorWithTx
func GetUnjailedValidators ¶
func GetUnjailedValidators() ([]ValidatorWithTx, error)
Click to show internal directories.
Click to hide internal directories.