Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) BeginBlocker(ctx context.Context) error
- func (k Keeper) GetEvidenceHandler(evidenceRoute string) (types.Handler, error)
- func (k Keeper) Logger(ctx context.Context) log.Logger
- func (k *Keeper) SetRouter(rtr types.Router)
- func (k Keeper) SubmitEvidence(ctx context.Context, evidence exported.Evidence) error
- type Querier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Keeper ¶
type Keeper struct { Schema collections.Schema Evidences collections.Map[[]byte, exported.Evidence] // contains filtered or unexported fields }
Keeper defines the evidence module's keeper. The keeper is responsible for managing persistence, state transitions and query handling for the evidence module.
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService store.KVStoreService, stakingKeeper types.StakingKeeper, slashingKeeper types.SlashingKeeper, ac address.Codec, ci comet.BlockInfoService, ) *Keeper
NewKeeper creates a new Keeper object.
func (Keeper) BeginBlocker ¶
BeginBlocker iterates through and handles any newly discovered evidence of misbehavior submitted by CometBFT. Currently, only equivocation is handled.
func (Keeper) GetEvidenceHandler ¶
GetEvidenceHandler returns a registered Handler for a given Evidence type. If no handler exists, an error is returned.
func (Keeper) Logger ¶
Logger returns a module-specific logger.
func (*Keeper) SetRouter ¶
SetRouter sets the Evidence Handler router for the x/evidence module. Note, we allow the ability to set the router after the Keeper is constructed as a given Handler may need access the Keeper before being constructed. The router may only be set once and will be sealed if it's not already sealed.
func (Keeper) SubmitEvidence ¶
SubmitEvidence attempts to match evidence against the keepers router and execute the corresponding registered Evidence Handler. An error is returned if no registered Handler exists or if the Handler fails. Otherwise, the evidence is persisted.
type Querier ¶
type Querier struct {
// contains filtered or unexported fields
}
func (Querier) AllEvidence ¶
func (k Querier) AllEvidence(ctx context.Context, req *types.QueryAllEvidenceRequest) (*types.QueryAllEvidenceResponse, error)
AllEvidence implements the Query/AllEvidence gRPC method
func (Querier) Evidence ¶
func (k Querier) Evidence(c context.Context, req *types.QueryEvidenceRequest) (*types.QueryEvidenceResponse, error)
Evidence implements the Query/Evidence gRPC method