Skip to content

Commit

Permalink
ree
Browse files Browse the repository at this point in the history
  • Loading branch information
itsdevbear committed Aug 10, 2023
1 parent 658a88a commit 455ee65
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion x/evidence/keeper/infraction.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (k Keeper) handleEquivocationEvidence(ctx context.Context, evidence *types.
logger := k.Logger(ctx)
consAddr := evidence.GetConsensusAddress()

validator, err := k.stakingKeeper.ValidatorByConsAddr(ctx, consAddr)
validator, err := k.validatorStore.ValidatorByConsAddr(ctx, consAddr)
if err != nil {
return err
}
Expand Down
7 changes: 4 additions & 3 deletions x/evidence/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"cosmossdk.io/x/evidence/exported"
"cosmossdk.io/x/evidence/types"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
)
Expand All @@ -26,7 +27,7 @@ type Keeper struct {
cdc codec.BinaryCodec
storeService store.KVStoreService
router types.Router
stakingKeeper types.StakingKeeper
validatorStore baseapp.ValidatorStore
slashingKeeper types.SlashingKeeper
addressCodec address.Codec

Expand All @@ -38,14 +39,14 @@ type Keeper struct {

// NewKeeper creates a new Keeper object.
func NewKeeper(
cdc codec.BinaryCodec, storeService store.KVStoreService, stakingKeeper types.StakingKeeper,
cdc codec.BinaryCodec, storeService store.KVStoreService, validatorStore baseapp.ValidatorStore,
slashingKeeper types.SlashingKeeper, ac address.Codec, ci comet.BlockInfoService,
) *Keeper {
sb := collections.NewSchemaBuilder(storeService)
k := &Keeper{
cdc: cdc,
storeService: storeService,
stakingKeeper: stakingKeeper,
validatorStore: validatorStore,
slashingKeeper: slashingKeeper,
addressCodec: ac,
cometInfo: ci,
Expand Down
1 change: 0 additions & 1 deletion x/evidence/types/expected_keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ type (
// evidence module.
StakingKeeper interface {
ValidatorByConsAddr(context.Context, sdk.ConsAddress) (stakingtypes.ValidatorI, error)
GetParams(ctx context.Context) (params stakingtypes.Params, err error)
}

// SlashingKeeper defines the slashing module interface contract needed by the
Expand Down
1 change: 1 addition & 0 deletions x/gov/keeper/vote.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func (keeper Keeper) AddVote(ctx context.Context, proposalID uint64, voterAddr s
sdkCtx.EventManager().EmitEvent(
sdk.NewEvent(
types.EventTypeProposalVote,
sdk.NewAttribute(types.AttributeKeyVoter, voterAddr.String()),
sdk.NewAttribute(types.AttributeKeyOption, options.String()),
sdk.NewAttribute(types.AttributeKeyProposalID, fmt.Sprintf("%d", proposalID)),
),
Expand Down
1 change: 1 addition & 0 deletions x/gov/types/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const (
EventTypeCancelProposal = "cancel_proposal"

AttributeKeyProposalResult = "proposal_result"
AttributeKeyVoter = "voter"
AttributeKeyOption = "option"
AttributeKeyProposalID = "proposal_id"
AttributeKeyProposalMessages = "proposal_messages" // Msg type_urls in the proposal
Expand Down

0 comments on commit 455ee65

Please sign in to comment.