Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []abci.ValidatorUpdate, err error)
- func (k Keeper) CountLastValidators(ctx sdk.Context) (count int)
- func (k Keeper) GetAllLastValidatorPower(ctx sdk.Context) (list []types.LastValidatorPower)
- func (k Keeper) GetAllLastValidators(ctx sdk.Context) (validators []types.Validator)
- func (k Keeper) GetAllValidator(ctx sdk.Context) (list []types.Validator)
- func (k Keeper) GetLastValidatorPower(ctx sdk.Context, owner sdk.ValAddress) (val types.LastValidatorPower, found bool)
- func (k Keeper) GetValidator(ctx sdk.Context, owner sdk.ValAddress) (val types.Validator, found bool)
- func (k Keeper) GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator types.Validator, found bool)
- func (k Keeper) HandleDoubleSign(ctx sdk.Context, evidence *evidencetypes.Equivocation)
- func (k Keeper) IsLastValidatorPowerPresent(ctx sdk.Context, owner sdk.ValAddress) bool
- func (k Keeper) IsValidatorPresent(ctx sdk.Context, owner sdk.ValAddress) bool
- func (k Keeper) IterateLastValidators(ctx sdk.Context, process func(validator types.Validator) (stop bool))
- func (k Keeper) IterateValidators(ctx sdk.Context, process func(validator types.Validator) (stop bool))
- func (k Keeper) Jail(ctx sdk.Context, validator types.Validator, reason string)
- func (k Keeper) LastValidatorPower(c context.Context, req *types.QueryGetLastValidatorPowerRequest) (*types.QueryGetLastValidatorPowerResponse, error)
- func (k Keeper) LastValidatorPowerAll(c context.Context, req *types.QueryAllLastValidatorPowerRequest) (*types.QueryAllLastValidatorPowerResponse, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) RemoveLastValidatorPower(ctx sdk.Context, owner sdk.ValAddress)
- func (k Keeper) RemoveValidator(ctx sdk.Context, owner sdk.ValAddress)
- func (k Keeper) SetLastValidatorPower(ctx sdk.Context, lastValidatorPower types.LastValidatorPower)
- func (k Keeper) SetValidator(ctx sdk.Context, validator types.Validator)
- func (k Keeper) SetValidatorByConsAddr(ctx sdk.Context, validator types.Validator) error
- func (k Keeper) Unjail(ctx sdk.Context, validator types.Validator)
- func (k Keeper) Validator(c context.Context, req *types.QueryGetValidatorRequest) (*types.QueryGetValidatorResponse, error)
- func (k Keeper) ValidatorAll(c context.Context, req *types.QueryAllValidatorRequest) (*types.QueryAllValidatorResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey sdk.StoreKey, dclauthKeeper types.DclauthKeeper, ) *Keeper
func (Keeper) ApplyAndReturnValidatorSetUpdates ¶
func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []abci.ValidatorUpdate, err error)
Apply and return accumulated updates to the bonded validator set. It gets called once after genesis and at every EndBlock.
Only validators that were added or were removed from the validator set are returned to Tendermint.
func (Keeper) CountLastValidators ¶
count total number of active validators.
func (Keeper) GetAllLastValidatorPower ¶
func (k Keeper) GetAllLastValidatorPower(ctx sdk.Context) (list []types.LastValidatorPower)
GetAllLastValidatorPower returns all lastValidatorPower.
func (Keeper) GetAllLastValidators ¶
get all active validator set.
func (Keeper) GetAllValidator ¶
GetAllValidator returns all validator.
func (Keeper) GetLastValidatorPower ¶
func (k Keeper) GetLastValidatorPower( ctx sdk.Context, owner sdk.ValAddress, ) (val types.LastValidatorPower, found bool)
GetLastValidatorPower returns a lastValidatorPower from its index.
func (Keeper) GetValidator ¶
func (k Keeper) GetValidator( ctx sdk.Context, owner sdk.ValAddress, ) (val types.Validator, found bool)
GetValidator returns a validator from its index.
func (Keeper) GetValidatorByConsAddr ¶
func (k Keeper) GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator types.Validator, found bool)
get a single validator by consensus address.
func (Keeper) HandleDoubleSign ¶
func (k Keeper) HandleDoubleSign(ctx sdk.Context, evidence *evidencetypes.Equivocation)
handle a validator signing two blocks at the same height Zeros validator power and jail it. So validator will be removed from validator set at the end of the block.
func (Keeper) IsLastValidatorPowerPresent ¶
Check if the validator power record associated with validator address is present in the store or not.
func (Keeper) IsValidatorPresent ¶
Check if the Validator record associated with a validator address is present in the store or not.
func (Keeper) IterateLastValidators ¶
func (k Keeper) IterateLastValidators(ctx sdk.Context, process func(validator types.Validator) (stop bool))
iterate through the active validator set and perform the provided function.
func (Keeper) IterateValidators ¶
func (k Keeper) IterateValidators(ctx sdk.Context, process func(validator types.Validator) (stop bool))
iterate over validators and apply function.
func (Keeper) LastValidatorPower ¶
func (k Keeper) LastValidatorPower(c context.Context, req *types.QueryGetLastValidatorPowerRequest) (*types.QueryGetLastValidatorPowerResponse, error)
func (Keeper) LastValidatorPowerAll ¶
func (k Keeper) LastValidatorPowerAll(c context.Context, req *types.QueryAllLastValidatorPowerRequest) (*types.QueryAllLastValidatorPowerResponse, error)
func (Keeper) RemoveLastValidatorPower ¶
func (k Keeper) RemoveLastValidatorPower( ctx sdk.Context, owner sdk.ValAddress, )
RemoveLastValidatorPower removes a lastValidatorPower from the store.
func (Keeper) RemoveValidator ¶
func (k Keeper) RemoveValidator( ctx sdk.Context, owner sdk.ValAddress, )
RemoveValidator removes a validator from the store.
func (Keeper) SetLastValidatorPower ¶
func (k Keeper) SetLastValidatorPower(ctx sdk.Context, lastValidatorPower types.LastValidatorPower)
SetLastValidatorPower set a specific lastValidatorPower in the store from its index.
func (Keeper) SetValidator ¶
SetValidator set a specific validator in the store from its index.
func (Keeper) SetValidatorByConsAddr ¶
validator index.
func (Keeper) Validator ¶
func (k Keeper) Validator(c context.Context, req *types.QueryGetValidatorRequest) (*types.QueryGetValidatorResponse, error)
func (Keeper) ValidatorAll ¶
func (k Keeper) ValidatorAll(c context.Context, req *types.QueryAllValidatorRequest) (*types.QueryAllValidatorResponse, error)