github.com/lino-network/lino@v0.6.11/x/validator/model/validator.go (about) 1 package model 2 3 import ( 4 abci "github.com/tendermint/tendermint/abci/types" 5 "github.com/tendermint/tendermint/crypto" 6 7 linotypes "github.com/lino-network/lino/types" 8 ) 9 10 // Validator is basic structure records all validator information 11 type Validator struct { 12 ABCIValidator abci.Validator `json:"abci_validator"` 13 PubKey crypto.PubKey `json:"pubkey"` 14 Username linotypes.AccountKey `json:"username"` 15 ReceivedVotes linotypes.Coin `json:"received_votes"` 16 HasRevoked bool `json:"has_revoked"` 17 AbsentCommit int64 `json:"absent_commit"` 18 ProducedBlocks int64 `json:"produced_blocks"` 19 Link string `json:"link"` 20 NumSlash int64 `json:"num_slash"` 21 } 22 23 type ElectionVote struct { 24 ValidatorName linotypes.AccountKey `json:"validator_name"` 25 Vote linotypes.Coin `json:"votes"` 26 } 27 28 type ReceivedVotesStatus struct { 29 ValidatorName linotypes.AccountKey `json:"validator_name"` 30 ReceivedVotes linotypes.Coin `json:"received_votes"` 31 } 32 33 type ElectionVoteList struct { 34 ElectionVotes []ElectionVote `json:"election_votes"` 35 } 36 37 // ValidatorList 38 type ValidatorList struct { 39 Oncall []linotypes.AccountKey `json:"oncall"` 40 Standby []linotypes.AccountKey `json:"standby"` 41 Candidates []linotypes.AccountKey `json:"candidates"` 42 Jail []linotypes.AccountKey `json:"jail"` 43 PreBlockValidators []linotypes.AccountKey `json:"pre_block_validators"` 44 LowestOncallVotes linotypes.Coin `json:"lowest_oncall_votes"` 45 LowestOncall linotypes.AccountKey `json:"lowest_oncall"` 46 LowestStandbyVotes linotypes.Coin `json:"lowest_standby_votes"` 47 LowestStandby linotypes.AccountKey `json:"lowest_standby"` 48 }