Documentation ¶
Index ¶
- func NewQuerier(k Keeper) sdk.Querier
- type Keeper
- func (k Keeper) AppendApplication(ctx sdk.Context, candidate types.Validator)
- func (k Keeper) AppendKickProposal(ctx sdk.Context, candidate types.Validator)
- func (k Keeper) AppendValidator(ctx sdk.Context, validator types.Validator)
- func (k Keeper) GetAllApplications(ctx sdk.Context) (applications []types.Vote)
- func (k Keeper) GetAllKickProposals(ctx sdk.Context) (kickProposals []types.Vote)
- func (k Keeper) GetAllValidators(ctx sdk.Context) (validators []types.Validator)
- func (k Keeper) GetApplication(ctx sdk.Context, addr sdk.ValAddress) (application types.Vote, found bool)
- func (k Keeper) GetApplicationByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (application types.Vote, found bool)
- func (k Keeper) GetKickProposal(ctx sdk.Context, addr sdk.ValAddress) (kickProposal types.Vote, found bool)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator types.Validator, found bool)
- func (k Keeper) GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator types.Validator, found bool)
- func (k Keeper) GetValidatorState(ctx sdk.Context, addr sdk.ValAddress) (state uint16, found bool)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MaxValidators(ctx sdk.Context) (res uint16)
- func (k Keeper) Quorum(ctx sdk.Context) (res uint16)
- func (k Keeper) RemoveApplication(ctx sdk.Context, address sdk.ValAddress)
- func (k Keeper) RemoveKickProposal(ctx sdk.Context, address sdk.ValAddress)
- func (k Keeper) RemoveValidator(ctx sdk.Context, address sdk.ValAddress)
- func (k Keeper) SetApplication(ctx sdk.Context, application types.Vote)
- func (k Keeper) SetApplicationByConsAddr(ctx sdk.Context, application types.Vote)
- func (k Keeper) SetKickProposal(ctx sdk.Context, kickProposal types.Vote)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetValidator(ctx sdk.Context, validator types.Validator)
- func (k Keeper) SetValidatorByConsAddr(ctx sdk.Context, validator types.Validator)
- func (k Keeper) SetValidatorState(ctx sdk.Context, validator types.Validator, state uint16)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
NewQuerier creates a new querier for poa clients.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the poa store
func (Keeper) AppendApplication ¶
Append a new application with a new vote
func (Keeper) AppendKickProposal ¶
Append a new kick proposal with a new vote
func (Keeper) AppendValidator ¶
Append a validator and set its state to joining
func (Keeper) GetAllApplications ¶
Get the set of all application
func (Keeper) GetAllKickProposals ¶
Get the set of all kick proposals
func (Keeper) GetAllValidators ¶
Get the set of all validators
func (Keeper) GetApplication ¶
func (k Keeper) GetApplication(ctx sdk.Context, addr sdk.ValAddress) (application types.Vote, found bool)
Get an application
func (Keeper) GetApplicationByConsAddr ¶
func (k Keeper) GetApplicationByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (application types.Vote, found bool)
Get an application by consensus address
func (Keeper) GetKickProposal ¶
func (k Keeper) GetKickProposal(ctx sdk.Context, addr sdk.ValAddress) (kickProposal types.Vote, found bool)
Get a kick proposal
func (Keeper) GetValidator ¶
func (k Keeper) GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator types.Validator, found bool)
Get a validator
func (Keeper) GetValidatorByConsAddr ¶
func (k Keeper) GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator types.Validator, found bool)
Get a validator by consensus address
func (Keeper) GetValidatorState ¶
Get a validator state
func (Keeper) MaxValidators ¶
MaxValidators - Maximum number of validators
func (Keeper) RemoveApplication ¶
func (k Keeper) RemoveApplication(ctx sdk.Context, address sdk.ValAddress)
Remove the application
func (Keeper) RemoveKickProposal ¶
func (k Keeper) RemoveKickProposal(ctx sdk.Context, address sdk.ValAddress)
Remove the kick proposal
func (Keeper) RemoveValidator ¶
func (k Keeper) RemoveValidator(ctx sdk.Context, address sdk.ValAddress)
Remove the validator !!! This function should only be called by the end blocker to ensure the validator is removed from the Tendermint validator state !!! This function is called by the end blocker when the validator state is leaving
func (Keeper) SetApplication ¶
Set application details
func (Keeper) SetApplicationByConsAddr ¶
Set application consensus address
func (Keeper) SetKickProposal ¶
Set kick proposal details
func (Keeper) SetValidator ¶
Set validator details
func (Keeper) SetValidatorByConsAddr ¶
Set validator consensus address