model

package
v0.6.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2020 License: Apache-2.0 Imports: 8 Imported by: 3 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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)

func (ValidatorStorage) StoreMap added in v0.4.0

func (vs ValidatorStorage) StoreMap(ctx sdk.Context) utils.StoreMap

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL