Skip to content

Commit

Permalink
test: fix TokenizeShare simulation (#19491)
Browse files Browse the repository at this point in the history
  • Loading branch information
sainoe authored Feb 20, 2024
1 parent 099fa4a commit 5b3a40d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/staking/simulation/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ func SimulateMsgTokenizeShares(ak types.AccountKeeper, bk types.BankKeeper, k *k
if totalStaked.IsZero() {
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTokenizeShares, "cannot happened - no validators bonded if stake is 0.0"), nil, nil // skip
}
totalLiquidStaked := sdk.NewDecFromInt(k.GetTotalLiquidStakedTokens(ctx))
totalLiquidStaked := sdk.NewDecFromInt(k.GetTotalLiquidStakedTokens(ctx).Add(tokenizeShareAmt))
liquidStakedPercent := totalLiquidStaked.Quo(totalStaked)
if liquidStakedPercent.GT(params.GlobalLiquidStakingCap) {
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgTokenizeShares, "global liquid staking cap exceeded"), nil, nil
Expand Down

0 comments on commit 5b3a40d

Please sign in to comment.