Documentation ¶
Index ¶
- type Module
- func (m *Module) GetStakingPool(height int64) (*types.Pool, error)
- func (m *Module) GetValidatorsStatuses(height int64, validators []stakingtypes.Validator) ([]types.ValidatorStatus, error)
- func (m *Module) GetValidatorsVotingPowers(height int64, vals *tmctypes.ResultValidators) ([]types.ValidatorVotingPower, error)
- func (m *Module) GetValidatorsWithStatus(height int64, status string) ([]stakingtypes.Validator, []types.Validator, error)
- func (m *Module) HandleBlock(block *tmctypes.ResultBlock, res *tmctypes.ResultBlockResults, _ []*juno.Tx, ...) error
- func (m *Module) HandleGenesis(doc *tmtypes.GenesisDoc, appState map[string]json.RawMessage) error
- func (m *Module) HandleMsg(index int, msg sdk.Msg, tx *juno.Tx) error
- func (m *Module) Name() string
- func (m *Module) RefreshValidatorInfos(height int64, valOper string) error
- func (m *Module) StoreValidatorsFromMsgCreateValidator(height int64, msg *stakingtypes.MsgCreateValidator) error
- func (m *Module) UpdateParams(height int64) error
- type SlashingModule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module represents the x/staking module
func NewModule ¶
func NewModule( source stakingsource.Source, slashingModule SlashingModule, cdc codec.Codec, db *database.Db, ) *Module
NewModule returns a new Module instance
func (*Module) GetValidatorsStatuses ¶
func (m *Module) GetValidatorsStatuses(height int64, validators []stakingtypes.Validator) ([]types.ValidatorStatus, error)
func (*Module) GetValidatorsVotingPowers ¶
func (m *Module) GetValidatorsVotingPowers(height int64, vals *tmctypes.ResultValidators) ([]types.ValidatorVotingPower, error)
func (*Module) GetValidatorsWithStatus ¶
func (m *Module) GetValidatorsWithStatus(height int64, status string) ([]stakingtypes.Validator, []types.Validator, error)
GetValidatorsWithStatus returns the list of all the validators having the given status at the given height
func (*Module) HandleBlock ¶
func (m *Module) HandleBlock( block *tmctypes.ResultBlock, res *tmctypes.ResultBlockResults, _ []*juno.Tx, vals *tmctypes.ResultValidators, ) error
HandleBlock implements BlockModule
func (*Module) HandleGenesis ¶
func (m *Module) HandleGenesis(doc *tmtypes.GenesisDoc, appState map[string]json.RawMessage) error
HandleGenesis implements GenesisModule
func (*Module) RefreshValidatorInfos ¶
RefreshValidatorInfos refreshes the info for the validator with the given operator address at the provided height
func (*Module) StoreValidatorsFromMsgCreateValidator ¶
func (m *Module) StoreValidatorsFromMsgCreateValidator(height int64, msg *stakingtypes.MsgCreateValidator) error
StoreValidatorFromMsgCreateValidator handles properly a MsgCreateValidator instance by saving into the database all the data associated to such validator
func (*Module) UpdateParams ¶
UpdateParams gets the updated params and stores them inside the database
type SlashingModule ¶
type SlashingModule interface {
GetSigningInfo(height int64, consAddr sdk.ConsAddress) (types.ValidatorSigningInfo, error)
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.