Skip to content

Commit

Permalink
fix(tests): fix simulations on cancel unbond (#11712)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsk967 authored Apr 21, 2022
1 parent 2c94c2e commit c01b825
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions x/staking/simulation/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,7 @@ func SimulateMsgCancelUnbondingDelegate(ak types.AccountKeeper, bk types.BankKee
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgCancelUnbondingDelegation, "delegator receiving balance is negative"), nil, nil
}

cancelBondAmt, err := simtypes.RandPositiveInt(r, unbondingDelegationEntry.Balance)
if err != nil {
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgCancelUnbondingDelegation, "invalid cancelBondAmt amount"), nil, err
}
cancelBondAmt := simtypes.RandomAmount(r, unbondingDelegationEntry.Balance)

if cancelBondAmt.IsZero() {
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgCancelUnbondingDelegation, "cancelBondAmt amount is zero"), nil, nil
Expand Down

0 comments on commit c01b825

Please sign in to comment.