Skip to content

Commit

Permalink
add events
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba committed May 28, 2024
1 parent 0705c2b commit 2177555
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion x/oracle/keeper/slash.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ package keeper

import (
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/umee-network/umee/v6/util/sdkutil"
"github.com/umee-network/umee/v6/x/oracle/types"
)

// SlashAndResetMissCounters iterates over all the current missed counters and
Expand Down Expand Up @@ -42,8 +45,14 @@ func (k Keeper) SlashAndResetMissCounters(ctx sdk.Context) {
distributionHeight,
validator.GetConsensusPower(powerReduction), slashFraction,
)

k.StakingKeeper.Jail(ctx, consAddr)

sdkutil.Emit(&ctx, &types.EventSlash{
Validator: consAddr.String(),
Factor: slashFraction,
Reason: "voting_rate",
Jailed: true,
})
}
}

Expand Down

0 comments on commit 2177555

Please sign in to comment.