Documentation
¶
Index ¶
- Variables
- func GetElectionVoteListKey(accKey linotypes.AccountKey) []byte
- func GetValidatorKey(accKey linotypes.AccountKey) []byte
- func GetValidatorListKey() []byte
- type ABCIPubKeyIR
- type ABCIValidatorIR
- type ElectionVote
- type ElectionVoteIR
- type ElectionVoteList
- type ElectionVoteListIR
- type ReceivedVotesStatus
- type Validator
- type ValidatorIR
- type ValidatorList
- type ValidatorListIR
- type ValidatorStorage
- func (vs ValidatorStorage) GetElectionVoteList(ctx sdk.Context, accKey linotypes.AccountKey) *ElectionVoteList
- func (vs ValidatorStorage) GetValidator(ctx sdk.Context, accKey linotypes.AccountKey) (*Validator, sdk.Error)
- func (vs ValidatorStorage) GetValidatorList(ctx sdk.Context) *ValidatorList
- func (vs ValidatorStorage) SetElectionVoteList(ctx sdk.Context, accKey linotypes.AccountKey, lst *ElectionVoteList)
- func (vs ValidatorStorage) SetValidator(ctx sdk.Context, accKey linotypes.AccountKey, validator *Validator)
- func (vs ValidatorStorage) SetValidatorList(ctx sdk.Context, lst *ValidatorList)
- func (vs ValidatorStorage) StoreMap(ctx sdk.Context) utils.StoreMap
- type ValidatorTablesIR
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ValidatorSubstore = []byte{0x00} ValidatorListSubstore = []byte{0x01} ElectionVoteListSubstore = []byte{0x02} )
Functions ¶
func GetElectionVoteListKey ¶ added in v0.4.0
func GetElectionVoteListKey(accKey linotypes.AccountKey) []byte
func GetValidatorKey ¶
func GetValidatorKey(accKey linotypes.AccountKey) []byte
func GetValidatorListKey ¶
func GetValidatorListKey() []byte
Types ¶
type ABCIPubKeyIR ¶ added in v0.2.0
type ABCIPubKeyIR struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
}
ABCIPubKeyIR.
func NewABCIPubKeyIRFromTM ¶ added in v0.4.0
func NewABCIPubKeyIRFromTM(pubkey crypto.PubKey) ABCIPubKeyIR
func (ABCIPubKeyIR) ToTM ¶ added in v0.4.0
func (pubkey ABCIPubKeyIR) ToTM() crypto.PubKey
type ABCIValidatorIR ¶ added in v0.2.0
type ABCIValidatorIR struct {
Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
Power int64 `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"`
}
ABCIValidatorIR.
type ElectionVote ¶ added in v0.4.0
type ElectionVote struct {
ValidatorName linotypes.AccountKey `json:"validator_name"`
Vote linotypes.Coin `json:"votes"`
}
type ElectionVoteIR ¶ added in v0.4.0
type ElectionVoteIR struct {
ValidatorName types.AccountKey `json:"validator_name"`
Vote types.Coin `json:"votes"`
}
type ElectionVoteList ¶ added in v0.4.0
type ElectionVoteList struct {
ElectionVotes []ElectionVote `json:"election_votes"`
}
type ElectionVoteListIR ¶ added in v0.4.0
type ElectionVoteListIR struct {
Username types.AccountKey `json:"username"`
ElectionVotes []ElectionVoteIR `json:"election_votes"`
}
type ReceivedVotesStatus ¶ added in v0.4.0
type ReceivedVotesStatus struct {
ValidatorName linotypes.AccountKey `json:"validator_name"`
ReceivedVotes linotypes.Coin `json:"received_votes"`
}
type Validator ¶
type Validator struct {
ABCIValidator abci.Validator `json:"abci_validator"`
PubKey crypto.PubKey `json:"pubkey"`
Username linotypes.AccountKey `json:"username"`
ReceivedVotes linotypes.Coin `json:"received_votes"`
HasRevoked bool `json:"has_revoked"`
AbsentCommit int64 `json:"absent_commit"`
ProducedBlocks int64 `json:"produced_blocks"`
Link string `json:"link"`
NumSlash int64 `json:"num_slash"`
}
Validator is basic structure records all validator information
type ValidatorIR ¶ added in v0.2.0
type ValidatorIR struct {
ABCIValidator ABCIValidatorIR `json:"abci_validator"`
PubKey ABCIPubKeyIR `json:"pub_key"`
Username types.AccountKey `json:"username"`
ReceivedVotes types.Coin `json:"received_votes"`
HasRevoked bool `json:"has_revoked"`
AbsentCommit int64 `json:"absent_commit"`
ProducedBlocks int64 `json:"produced_blocks"`
Link string `json:"link"`
}
ValidatorIR
type ValidatorList ¶
type ValidatorList struct {
Oncall []linotypes.AccountKey `json:"oncall"`
Standby []linotypes.AccountKey `json:"standby"`
Candidates []linotypes.AccountKey `json:"candidates"`
Jail []linotypes.AccountKey `json:"jail"`
PreBlockValidators []linotypes.AccountKey `json:"pre_block_validators"`
LowestOncallVotes linotypes.Coin `json:"lowest_oncall_votes"`
LowestOncall linotypes.AccountKey `json:"lowest_oncall"`
LowestStandbyVotes linotypes.Coin `json:"lowest_standby_votes"`
LowestStandby linotypes.AccountKey `json:"lowest_standby"`
}
ValidatorList
type ValidatorListIR ¶ added in v0.4.0
type ValidatorListIR struct {
Oncall []types.AccountKey `json:"oncall"`
Standby []types.AccountKey `json:"standby"`
Candidates []types.AccountKey `json:"candidates"`
Jail []types.AccountKey `json:"jail"`
PreBlockValidators []types.AccountKey `json:"pre_block_validators"`
LowestOncallVotes types.Coin `json:"lowest_oncall_votes"`
LowestOncall types.AccountKey `json:"lowest_oncall"`
LowestStandbyVotes types.Coin `json:"lowest_standby_votes"`
LowestStandby types.AccountKey `json:"lowest_standby"`
}
ValidatorList
type ValidatorStorage ¶
type ValidatorStorage struct {
// contains filtered or unexported fields
}
func NewValidatorStorage ¶
func NewValidatorStorage(key sdk.StoreKey) ValidatorStorage
func (ValidatorStorage) GetElectionVoteList ¶ added in v0.4.0
func (vs ValidatorStorage) GetElectionVoteList(ctx sdk.Context, accKey linotypes.AccountKey) *ElectionVoteList
func (ValidatorStorage) GetValidator ¶
func (vs ValidatorStorage) GetValidator(ctx sdk.Context, accKey linotypes.AccountKey) (*Validator, sdk.Error)
func (ValidatorStorage) GetValidatorList ¶
func (vs ValidatorStorage) GetValidatorList(ctx sdk.Context) *ValidatorList
func (ValidatorStorage) SetElectionVoteList ¶ added in v0.4.0
func (vs ValidatorStorage) SetElectionVoteList(ctx sdk.Context, accKey linotypes.AccountKey, lst *ElectionVoteList)
func (ValidatorStorage) SetValidator ¶
func (vs ValidatorStorage) SetValidator(ctx sdk.Context, accKey linotypes.AccountKey, validator *Validator)
func (ValidatorStorage) SetValidatorList ¶
func (vs ValidatorStorage) SetValidatorList(ctx sdk.Context, lst *ValidatorList)
type ValidatorTablesIR ¶ added in v0.2.0
type ValidatorTablesIR struct {
Version int `json:"version"`
Validators []ValidatorIR `json:"validators"`
Votes []ElectionVoteListIR `json:"votes"`
List ValidatorListIR `json:"list"`
}
ValidatorTablesIR - Validators changed.
Click to show internal directories.
Click to hide internal directories.