Skip to content

Commit

Permalink
Merge pull request #426 from thomas-nguy/thomas/fix-bug-slashing
Browse files Browse the repository at this point in the history
Fix mistake on slashing logic
  • Loading branch information
EricBolten authored Jul 1, 2022
2 parents 636b959 + 3b53405 commit 2099d7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/x/gravity/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ func outgoingTxSlashing(ctx sdk.Context, k keeper.Keeper) {
for _, valInfo := range unbondingValInfos {
// Only slash validators who joined after valset is created and they are
// unbonding and UNBOND_SLASHING_WINDOW didn't pass.
if valInfo.exist && valInfo.sigs.StartHeight < int64(sstx.Nonce) &&
if valInfo.exist && valInfo.sigs.StartHeight < int64(sstx.Height) &&
valInfo.val.IsUnbonding() &&
sstx.Height < uint64(valInfo.val.UnbondingHeight)+params.UnbondSlashingSignerSetTxsWindow {
// check if validator has confirmed valset or not
Expand Down

0 comments on commit 2099d7a

Please sign in to comment.