Documentation ¶
Index ¶
- func ErrFailedToMarshalValidator(err error) sdk.Error
- func ErrFailedToMarshalValidatorList(err error) sdk.Error
- func ErrFailedToUnmarshalValidator(err error) sdk.Error
- func ErrFailedToUnmarshalValidatorList(err error) sdk.Error
- func ErrValidatorListNotFound() sdk.Error
- func ErrValidatorNotFound() sdk.Error
- func GetValidatorKey(accKey types.AccountKey) []byte
- func GetValidatorListKey() []byte
- type ABCIPubKeyIR
- type ABCIValidatorIR
- type Validator
- type ValidatorIR
- type ValidatorList
- type ValidatorListRow
- type ValidatorRow
- type ValidatorRowIR
- type ValidatorStorage
- func (vs ValidatorStorage) DeleteValidator(ctx sdk.Context, username types.AccountKey) sdk.Error
- func (vs ValidatorStorage) DoesValidatorExist(ctx sdk.Context, accKey types.AccountKey) bool
- func (vs ValidatorStorage) Export(ctx sdk.Context) *ValidatorTables
- func (vs ValidatorStorage) GetValidator(ctx sdk.Context, accKey types.AccountKey) (*Validator, sdk.Error)
- func (vs ValidatorStorage) GetValidatorList(ctx sdk.Context) (*ValidatorList, sdk.Error)
- func (vs ValidatorStorage) Import(ctx sdk.Context, tb *ValidatorTablesIR)
- func (vs ValidatorStorage) InitGenesis(ctx sdk.Context) error
- func (vs ValidatorStorage) SetValidator(ctx sdk.Context, accKey types.AccountKey, validator *Validator) sdk.Error
- func (vs ValidatorStorage) SetValidatorList(ctx sdk.Context, lst *ValidatorList) sdk.Error
- type ValidatorTables
- type ValidatorTablesIR
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrFailedToMarshalValidator ¶
marshal error
func ErrFailedToUnmarshalValidator ¶
unmarshal error
func GetValidatorKey ¶
func GetValidatorKey(accKey types.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 - type changed during upgrade.
type ABCIValidatorIR ¶ added in v0.2.0
type ABCIValidatorIR struct { Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` PubKey ABCIPubKeyIR `protobuf:"bytes,2,opt,name=pub_key,json=pubKey" json:"pub_key"` Power int64 `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"` }
ABCIValidatorIR - type changed during upgrade.
type Validator ¶
type Validator struct { ABCIValidator abci.Validator PubKey crypto.PubKey `json:"pubkey"` Username types.AccountKey `json:"username"` Deposit types.Coin `json:"deposit"` AbsentCommit int64 `json:"absent_commit"` ByzantineCommit int64 `json:"byzantine_commit"` ProducedBlocks int64 `json:"produced_blocks"` Link string `json:"link"` }
Validator is basic structure records all validator information
type ValidatorIR ¶ added in v0.2.0
type ValidatorIR struct { ABCIValidator ABCIValidatorIR Username types.AccountKey `json:"username"` Deposit types.Coin `json:"deposit"` AbsentCommit int64 `json:"absent_commit"` ByzantineCommit int64 `json:"byzantine_commit"` ProducedBlocks int64 `json:"produced_blocks"` Link string `json:"link"` }
ValidatorIR - ABCIValidator internally changed.
type ValidatorList ¶
type ValidatorList struct { OncallValidators []types.AccountKey `json:"oncall_validators"` AllValidators []types.AccountKey `json:"all_validators"` PreBlockValidators []types.AccountKey `json:"pre_block_validators"` LowestPower types.Coin `json:"lowest_power"` LowestValidator types.AccountKey `json:"lowest_validator"` }
ValidatorList -
type ValidatorListRow ¶ added in v0.2.0
type ValidatorListRow struct {
List ValidatorList `json:"list"`
}
ValidatorListRow - pk: none
type ValidatorRow ¶ added in v0.2.0
type ValidatorRow struct { Username types.AccountKey `json:"username"` // XXX(yumin): type changed. Validator Validator `json:"validator"` }
ValidatorRow - pk: (Username)
type ValidatorRowIR ¶ added in v0.2.0
type ValidatorRowIR struct { Username types.AccountKey `json:"username"` // XXX(yumin): type changed. Validator ValidatorIR `json:"validator"` }
ValidatorRowIR - pk: (Username)
type ValidatorStorage ¶
type ValidatorStorage struct {
// contains filtered or unexported fields
}
func NewValidatorStorage ¶
func NewValidatorStorage(key sdk.StoreKey) ValidatorStorage
func (ValidatorStorage) DeleteValidator ¶
func (vs ValidatorStorage) DeleteValidator(ctx sdk.Context, username types.AccountKey) sdk.Error
func (ValidatorStorage) DoesValidatorExist ¶
func (vs ValidatorStorage) DoesValidatorExist(ctx sdk.Context, accKey types.AccountKey) bool
func (ValidatorStorage) Export ¶ added in v0.2.0
func (vs ValidatorStorage) Export(ctx sdk.Context) *ValidatorTables
Export state of validators.
func (ValidatorStorage) GetValidator ¶
func (vs ValidatorStorage) GetValidator(ctx sdk.Context, accKey types.AccountKey) (*Validator, sdk.Error)
func (ValidatorStorage) GetValidatorList ¶
func (vs ValidatorStorage) GetValidatorList(ctx sdk.Context) (*ValidatorList, sdk.Error)
func (ValidatorStorage) Import ¶ added in v0.2.0
func (vs ValidatorStorage) Import(ctx sdk.Context, tb *ValidatorTablesIR)
Import from tablesIR.
func (ValidatorStorage) InitGenesis ¶
func (vs ValidatorStorage) InitGenesis(ctx sdk.Context) error
func (ValidatorStorage) SetValidator ¶
func (vs ValidatorStorage) SetValidator(ctx sdk.Context, accKey types.AccountKey, validator *Validator) sdk.Error
func (ValidatorStorage) SetValidatorList ¶
func (vs ValidatorStorage) SetValidatorList(ctx sdk.Context, lst *ValidatorList) sdk.Error
type ValidatorTables ¶ added in v0.2.0
type ValidatorTables struct { Validators []ValidatorRow `json:"validators"` ValidatorList ValidatorListRow `json:"validator_list"` }
ValidatorTables state of validators
func (ValidatorTables) ToIR ¶ added in v0.2.0
func (v ValidatorTables) ToIR() *ValidatorTablesIR
ToIR -
type ValidatorTablesIR ¶ added in v0.2.0
type ValidatorTablesIR struct { Validators []ValidatorRowIR `json:"validators"` ValidatorList ValidatorListRow `json:"validator_list"` }
ValidatorTablesIR - Validators changed.
Click to show internal directories.
Click to hide internal directories.