Documentation ¶
Index ¶
- Constants
- func GetStakingValidators(ctx context.Context, height int64, status string, ...) ([]stakingtypes.Validator, []types.StakingValidator, error)
- func GetValidators(ctx context.Context, height int64, stakingClient stakingtypes.QueryClient, ...) ([]stakingtypes.Validator, []types.StakingValidator, error)
- type AccountCache
- type Module
- func (m *Module) HandleBlock(ctx context.Context, block *types.Block) error
- func (m *Module) HandleGenesis(ctx context.Context, doc *cometbfttypes.GenesisDoc, ...) error
- func (m *Module) HandleMessage(ctx context.Context, index int, cosmosMsg sdk.Msg, tx *types.Tx) error
- func (m *Module) HandleValidators(ctx context.Context, tmValidators *cometbftcoretypes.ResultValidators) error
- func (m *Module) Name() string
- func (m *Module) PublishValidatorsData(ctx context.Context, sVals []types.StakingValidator) error
- func (m *Module) WithAccountCache(cache AccountCache[string, int64]) *Module
Constants ¶
View Source
const (
ModuleName = "staking"
)
Variables ¶
This section is empty.
Functions ¶
func GetStakingValidators ¶
func GetStakingValidators(ctx context.Context, height int64, status string, stakingClient stakingtypes.QueryClient, cdc codec.Codec) ([]stakingtypes.Validator, []types.StakingValidator, error)
GetStakingValidators returns the list of all the validators having the given status at the given height.
func GetValidators ¶
func GetValidators(ctx context.Context, height int64, stakingClient stakingtypes.QueryClient, cdc codec.Codec) ([]stakingtypes.Validator, []types.StakingValidator, error)
GetValidators returns the validators list at the given height.
Types ¶
type AccountCache ¶ added in v0.3.2
type AccountCache[K, V comparable] interface { UpdateCacheValue(K, V) bool }
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) HandleBlock ¶
func (*Module) HandleGenesis ¶
func (m *Module) HandleGenesis( ctx context.Context, doc *cometbfttypes.GenesisDoc, appState map[string]json.RawMessage, ) error
func (*Module) HandleMessage ¶
func (*Module) HandleValidators ¶
func (m *Module) HandleValidators(ctx context.Context, tmValidators *cometbftcoretypes.ResultValidators) error
HandleValidators handles validators for each block height.
func (*Module) PublishValidatorsData ¶
func (m *Module) PublishValidatorsData(ctx context.Context, sVals []types.StakingValidator) error
PublishValidatorsData produces a message about validator, account and validator info to the broker.
func (*Module) WithAccountCache ¶ added in v1.0.0
func (m *Module) WithAccountCache(cache AccountCache[string, int64]) *Module
Click to show internal directories.
Click to hide internal directories.