Documentation ¶
Index ¶
- type Hooks
- type ValidatorManager
- func (vm ValidatorManager) AfterAddingStake(ctx sdk.Context, username linotypes.AccountKey) sdk.Error
- func (vm ValidatorManager) AfterSlashing(ctx sdk.Context, username linotypes.AccountKey) sdk.Error
- func (vm ValidatorManager) AfterSubtractingStake(ctx sdk.Context, username linotypes.AccountKey) sdk.Error
- func (vm ValidatorManager) DistributeInflationToValidator(ctx sdk.Context) sdk.Error
- func (vm ValidatorManager) ExportToFile(ctx sdk.Context, cdc *codec.Codec, filepath string) error
- func (vm ValidatorManager) GetAllValidators(ctx sdk.Context) []linotypes.AccountKey
- func (vm ValidatorManager) GetCommittingValidatorVoteStatus(ctx sdk.Context) []model.ReceivedVotesStatus
- func (vm ValidatorManager) GetCommittingValidators(ctx sdk.Context) []linotypes.AccountKey
- func (vm ValidatorManager) GetElectionVoteList(ctx sdk.Context, accKey linotypes.AccountKey) *model.ElectionVoteList
- func (vm ValidatorManager) GetInitValidators(ctx sdk.Context) ([]abci.ValidatorUpdate, sdk.Error)
- func (vm ValidatorManager) GetValidator(ctx sdk.Context, accKey linotypes.AccountKey) (*model.Validator, sdk.Error)
- func (vm ValidatorManager) GetValidatorList(ctx sdk.Context) *model.ValidatorList
- func (vm ValidatorManager) GetValidatorUpdates(ctx sdk.Context) ([]abci.ValidatorUpdate, sdk.Error)
- func (vm ValidatorManager) Hooks() Hooks
- func (vs ValidatorManager) ImportFromFile(ctx sdk.Context, cdc *codec.Codec, filepath string) error
- func (vm ValidatorManager) InitGenesis(ctx sdk.Context)
- func (vm ValidatorManager) IsLegalValidator(ctx sdk.Context, accKey linotypes.AccountKey) bool
- func (vm ValidatorManager) OnBeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)
- func (vm ValidatorManager) PunishCommittingValidator(ctx sdk.Context, username linotypes.AccountKey, penalty linotypes.Coin, ...) sdk.Error
- func (vm ValidatorManager) RegisterValidator(ctx sdk.Context, username linotypes.AccountKey, valPubKey crypto.PubKey, ...) sdk.Error
- func (vm ValidatorManager) RevokeValidator(ctx sdk.Context, username linotypes.AccountKey) sdk.Error
- func (vm ValidatorManager) SetValidatorList(ctx sdk.Context, lst *model.ValidatorList)
- func (vm ValidatorManager) UpdateValidator(ctx sdk.Context, username linotypes.AccountKey, link string) sdk.Error
- func (vm ValidatorManager) VoteValidator(ctx sdk.Context, username linotypes.AccountKey, ...) sdk.Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
func (Hooks) AfterAddingStake ¶
func (Hooks) AfterSlashing ¶
func (Hooks) AfterSubtractingStake ¶
type ValidatorManager ¶
type ValidatorManager struct {
// contains filtered or unexported fields
}
ValidatorManager - validator manager
func NewValidatorManager ¶
func NewValidatorManager(key sdk.StoreKey, holder param.ParamKeeper, vote vote.VoteKeeper, global global.GlobalKeeper, acc acc.AccountKeeper) ValidatorManager
func (ValidatorManager) AfterAddingStake ¶
func (vm ValidatorManager) AfterAddingStake(ctx sdk.Context, username linotypes.AccountKey) sdk.Error
func (ValidatorManager) AfterSlashing ¶
func (vm ValidatorManager) AfterSlashing(ctx sdk.Context, username linotypes.AccountKey) sdk.Error
func (ValidatorManager) AfterSubtractingStake ¶
func (vm ValidatorManager) AfterSubtractingStake(ctx sdk.Context, username linotypes.AccountKey) sdk.Error
func (ValidatorManager) DistributeInflationToValidator ¶
func (vm ValidatorManager) DistributeInflationToValidator(ctx sdk.Context) sdk.Error
func (ValidatorManager) ExportToFile ¶
ExportToFile -
func (ValidatorManager) GetAllValidators ¶
func (vm ValidatorManager) GetAllValidators(ctx sdk.Context) []linotypes.AccountKey
func (ValidatorManager) GetCommittingValidatorVoteStatus ¶
func (vm ValidatorManager) GetCommittingValidatorVoteStatus(ctx sdk.Context) []model.ReceivedVotesStatus
func (ValidatorManager) GetCommittingValidators ¶
func (vm ValidatorManager) GetCommittingValidators(ctx sdk.Context) []linotypes.AccountKey
func (ValidatorManager) GetElectionVoteList ¶
func (vm ValidatorManager) GetElectionVoteList(ctx sdk.Context, accKey linotypes.AccountKey) *model.ElectionVoteList
func (ValidatorManager) GetInitValidators ¶
func (vm ValidatorManager) GetInitValidators(ctx sdk.Context) ([]abci.ValidatorUpdate, sdk.Error)
GetInitValidators return all validators in state. XXX(yumin): This is intended to be used only in initChainer
func (ValidatorManager) GetValidator ¶
func (vm ValidatorManager) GetValidator(ctx sdk.Context, accKey linotypes.AccountKey) (*model.Validator, sdk.Error)
getter and setter
func (ValidatorManager) GetValidatorList ¶
func (vm ValidatorManager) GetValidatorList(ctx sdk.Context) *model.ValidatorList
func (ValidatorManager) GetValidatorUpdates ¶
func (vm ValidatorManager) GetValidatorUpdates(ctx sdk.Context) ([]abci.ValidatorUpdate, sdk.Error)
GetValidatorUpdates - after a block, compare updated validator set with recorded validator set before block execution
func (ValidatorManager) ImportFromFile ¶
ImportFromFile import state from file.
func (ValidatorManager) InitGenesis ¶
func (vm ValidatorManager) InitGenesis(ctx sdk.Context)
InitGenesis - initialize KVStore
func (ValidatorManager) IsLegalValidator ¶
func (vm ValidatorManager) IsLegalValidator(ctx sdk.Context, accKey linotypes.AccountKey) bool
IsLegalValidator - check if the validator is a validator and not revoked.
func (ValidatorManager) OnBeginBlock ¶
func (vm ValidatorManager) OnBeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)
func (ValidatorManager) PunishCommittingValidator ¶
func (vm ValidatorManager) PunishCommittingValidator(ctx sdk.Context, username linotypes.AccountKey, penalty linotypes.Coin, punishType linotypes.PunishType) sdk.Error
PunishOncallValidator - punish committing validator if 1) byzantine or 2) missing blocks reach limiation
func (ValidatorManager) RegisterValidator ¶
func (vm ValidatorManager) RegisterValidator(ctx sdk.Context, username linotypes.AccountKey, valPubKey crypto.PubKey, link string) sdk.Error
RegisterValidator - register a validator.
func (ValidatorManager) RevokeValidator ¶
func (vm ValidatorManager) RevokeValidator(ctx sdk.Context, username linotypes.AccountKey) sdk.Error
func (ValidatorManager) SetValidatorList ¶
func (vm ValidatorManager) SetValidatorList(ctx sdk.Context, lst *model.ValidatorList)
func (ValidatorManager) UpdateValidator ¶ added in v0.5.1
func (vm ValidatorManager) UpdateValidator(ctx sdk.Context, username linotypes.AccountKey, link string) sdk.Error
func (ValidatorManager) VoteValidator ¶
func (vm ValidatorManager) VoteValidator(ctx sdk.Context, username linotypes.AccountKey, votedValidators []linotypes.AccountKey) sdk.Error
Click to show internal directories.
Click to hide internal directories.