Skip to content

Commit

Permalink
added fix for on-off validator
Browse files Browse the repository at this point in the history
  • Loading branch information
sampocs committed Mar 6, 2024
1 parent d1b5b0c commit 713cf49
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions x/distribution/keeper/delegation.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,15 @@ func (k Keeper) CalculateDelegationRewards(ctx sdk.Context, val stakingtypes.Val
// however any greater amount should be considered a breach in expected
// behaviour.
marginOfErr := sdk.SmallestDec().MulInt64(3)

// temporary fix, as this validator has a mismatch between their tokens->shares
// and how many slashes they've received on-chain.
// In particular, tokens->shares indicates 3 slashes,
// but records show only 2 slashes occurred
if del.GetValidatorAddr().String() == "stridevaloper1tlz6ksce084ndhwlq2usghamvh0dut9q4z2gxd" {
marginOfErr = sdk.NewDecFromInt(sdk.NewInt(5000000))
}

if stake.LTE(currentStake.Add(marginOfErr)) {
stake = currentStake
} else {
Expand Down

0 comments on commit 713cf49

Please sign in to comment.