Skip to content

Commit 5d26a35

Browse files
committed
fix(deps): fix golangci lint
1 parent 0ce3206 commit 5d26a35

File tree

22 files changed

+67
-69
lines changed

22 files changed

+67
-69
lines changed

tests/integration/staking/keeper/delegation_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,22 @@ func TestUnbondingDelegationsMaxEntries(t *testing.T) {
4444
// create a validator and a delegator to that validator
4545
validator := testutil.NewValidator(t, addrVal, PKs[0])
4646

47-
validator, issuedShares, _ := validator.AddTokensFromDel(startTokens, math.LegacyOneDec())
47+
validator, issuedShares, issuedRewardsShares := validator.AddTokensFromDel(startTokens, math.LegacyOneDec())
4848
assert.DeepEqual(t, startTokens, issuedShares.RoundInt())
4949

5050
validator = keeper.TestingUpdateValidator(f.stakingKeeper, ctx, validator, true)
5151
assert.Assert(math.IntEq(t, startTokens, validator.BondedTokens()))
5252
assert.Assert(t, validator.IsBonded())
5353

5454
delegation := types.NewDelegation(
55-
addrDel.String(), addrVal.String(), issuedShares, issuedShares)
55+
addrDel.String(), addrVal.String(), issuedShares, issuedShares.Quo(math.LegacyNewDec(2)))
5656
assert.NilError(t, f.stakingKeeper.SetDelegation(ctx, delegation))
5757
periodDel := types.NewPeriodDelegation(
5858
addrDel.String(),
5959
addrVal.String(),
6060
types.FlexiblePeriodDelegationID,
6161
issuedShares,
62-
issuedShares,
62+
issuedRewardsShares,
6363
types.DefaultFlexiblePeriodType,
6464
time.Time{},
6565
)
@@ -78,7 +78,7 @@ func TestUnbondingDelegationsMaxEntries(t *testing.T) {
7878
var err error
7979
ctx = ctx.WithBlockHeight(i)
8080
var amount math.Int
81-
completionTime, amount, err = f.stakingKeeper.Undelegate(ctx, addrDel, addrVal, types.FlexiblePeriodDelegationID, math.LegacyNewDec(1))
81+
completionTime, amount, err = f.stakingKeeper.Undelegate(ctx, addrDel, addrVal, types.FlexiblePeriodDelegationID, math.LegacyNewDec(1), math.LegacyNewDec(1).Quo(math.LegacyNewDec(2)))
8282
assert.NilError(t, err)
8383
totalUnbonded = totalUnbonded.Add(amount)
8484
}
@@ -94,7 +94,7 @@ func TestUnbondingDelegationsMaxEntries(t *testing.T) {
9494
oldNotBonded = f.bankKeeper.GetBalance(ctx, f.stakingKeeper.GetNotBondedPool(ctx).GetAddress(), bondDenom).Amount
9595

9696
// an additional unbond should fail due to max entries
97-
_, _, err = f.stakingKeeper.Undelegate(ctx, addrDel, addrVal, types.FlexiblePeriodDelegationID, math.LegacyNewDec(1))
97+
_, _, err = f.stakingKeeper.Undelegate(ctx, addrDel, addrVal, types.FlexiblePeriodDelegationID, math.LegacyNewDec(1), math.LegacyNewDec(1).Quo(math.LegacyNewDec(2)))
9898
assert.Error(t, err, "too many unbonding delegation entries for (delegator, validator) tuple")
9999

100100
newBonded = f.bankKeeper.GetBalance(ctx, f.stakingKeeper.GetBondedPool(ctx).GetAddress(), bondDenom).Amount
@@ -116,7 +116,7 @@ func TestUnbondingDelegationsMaxEntries(t *testing.T) {
116116
oldNotBonded = f.bankKeeper.GetBalance(ctx, f.stakingKeeper.GetNotBondedPool(ctx).GetAddress(), bondDenom).Amount
117117

118118
// unbonding should work again
119-
_, _, err = f.stakingKeeper.Undelegate(ctx, addrDel, addrVal, types.FlexiblePeriodDelegationID, math.LegacyNewDec(1))
119+
_, _, err = f.stakingKeeper.Undelegate(ctx, addrDel, addrVal, types.FlexiblePeriodDelegationID, math.LegacyNewDec(1), math.LegacyNewDec(1).Quo(math.LegacyNewDec(2)))
120120
assert.NilError(t, err)
121121

122122
newBonded = f.bankKeeper.GetBalance(ctx, f.stakingKeeper.GetBondedPool(ctx).GetAddress(), bondDenom).Amount

tests/integration/staking/keeper/determinstic_test.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import (
3434
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
3535
"github.com/cosmos/cosmos-sdk/x/staking"
3636
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
37-
"github.com/cosmos/cosmos-sdk/x/staking/types"
3837
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
3938
)
4039

@@ -465,13 +464,13 @@ func TestGRPCValidatorUnbondingDelegations(t *testing.T) {
465464
shares1, rewardsShares1, err := fundAccountAndDelegate(f, t, delegatorAddr1, validator, f.amt1)
466465
assert.NilError(t, err)
467466

468-
_, _, err = f.stakingKeeper.Undelegate(f.ctx, delegatorAddr1, validatorAddr1, types.FlexiblePeriodDelegationID, shares1, rewardsShares1)
467+
_, _, err = f.stakingKeeper.Undelegate(f.ctx, delegatorAddr1, validatorAddr1, stakingtypes.FlexiblePeriodDelegationID, shares1, rewardsShares1)
469468
assert.NilError(t, err)
470469

471470
shares2, rewardsShares2, err := fundAccountAndDelegate(f, t, delegatorAddr2, validator, f.amt2)
472471
assert.NilError(t, err)
473472

474-
_, _, err = f.stakingKeeper.Undelegate(f.ctx, delegatorAddr2, validatorAddr1, types.FlexiblePeriodDelegationID, shares2, rewardsShares2)
473+
_, _, err = f.stakingKeeper.Undelegate(f.ctx, delegatorAddr2, validatorAddr1, stakingtypes.FlexiblePeriodDelegationID, shares2, rewardsShares2)
475474
assert.NilError(t, err)
476475

477476
req := &stakingtypes.QueryValidatorUnbondingDelegationsRequest{
@@ -525,7 +524,7 @@ func TestGRPCUnbondingDelegation(t *testing.T) {
525524

526525
valbz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validator.GetOperator())
527526
assert.NilError(t, err)
528-
_, _, err = f.stakingKeeper.Undelegate(f.ctx, delegator, valbz, types.FlexiblePeriodDelegationID, shares, rewardsShares)
527+
_, _, err = f.stakingKeeper.Undelegate(f.ctx, delegator, valbz, stakingtypes.FlexiblePeriodDelegationID, shares, rewardsShares)
529528
assert.NilError(t, err)
530529

531530
req := &stakingtypes.QueryUnbondingDelegationRequest{
@@ -542,7 +541,7 @@ func TestGRPCUnbondingDelegation(t *testing.T) {
542541
shares1, rewardsShare2, err := fundAccountAndDelegate(f, t, delegatorAddr1, validator, f.amt1)
543542
assert.NilError(t, err)
544543

545-
_, _, err = f.stakingKeeper.Undelegate(f.ctx, delegatorAddr1, validatorAddr1, types.FlexiblePeriodDelegationID, shares1, rewardsShare2)
544+
_, _, err = f.stakingKeeper.Undelegate(f.ctx, delegatorAddr1, validatorAddr1, stakingtypes.FlexiblePeriodDelegationID, shares1, rewardsShare2)
546545
assert.NilError(t, err)
547546

548547
req := &stakingtypes.QueryUnbondingDelegationRequest{
@@ -636,7 +635,7 @@ func TestGRPCDelegatorUnbondingDelegations(t *testing.T) {
636635
assert.NilError(t, err)
637636
valbz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(validator.GetOperator())
638637
assert.NilError(t, err)
639-
_, _, err = f.stakingKeeper.Undelegate(f.ctx, delegator, valbz, types.FlexiblePeriodDelegationID, shares, rewardsShares)
638+
_, _, err = f.stakingKeeper.Undelegate(f.ctx, delegator, valbz, stakingtypes.FlexiblePeriodDelegationID, shares, rewardsShares)
640639
assert.NilError(t, err)
641640
}
642641

@@ -654,7 +653,7 @@ func TestGRPCDelegatorUnbondingDelegations(t *testing.T) {
654653
shares1, rewardsShare2, err := fundAccountAndDelegate(f, t, delegatorAddr1, validator, f.amt1)
655654
assert.NilError(t, err)
656655

657-
_, _, err = f.stakingKeeper.Undelegate(f.ctx, delegatorAddr1, validatorAddr1, types.FlexiblePeriodDelegationID, shares1, rewardsShare2)
656+
_, _, err = f.stakingKeeper.Undelegate(f.ctx, delegatorAddr1, validatorAddr1, stakingtypes.FlexiblePeriodDelegationID, shares1, rewardsShare2)
658657
assert.NilError(t, err)
659658

660659
req := &stakingtypes.QueryDelegatorUnbondingDelegationsRequest{

tests/integration/staking/keeper/grpc_query_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ func TestGRPCQueryUnbondingDelegation(t *testing.T) {
520520
unbondingTokens := f.stakingKeeper.TokensFromConsensusPower(ctx, 2)
521521
valAddr, err1 := sdk.ValAddressFromBech32(addrVal2)
522522
assert.NilError(t, err1)
523-
_, _, err := f.stakingKeeper.Undelegate(ctx, addrAcc2, valAddr, types.FlexiblePeriodDelegationID, math.LegacyNewDecFromInt(unbondingTokens))
523+
_, _, err := f.stakingKeeper.Undelegate(ctx, addrAcc2, valAddr, types.FlexiblePeriodDelegationID, math.LegacyNewDecFromInt(unbondingTokens), math.LegacyNewDecFromInt(unbondingTokens).Quo(math.LegacyNewDec(2)))
524524
assert.NilError(t, err)
525525

526526
unbond, found := f.stakingKeeper.GetUnbondingDelegation(ctx, addrAcc2, valAddr)
@@ -623,11 +623,11 @@ func TestGRPCQueryDelegatorUnbondingDelegations(t *testing.T) {
623623
unbondingTokens := f.stakingKeeper.TokensFromConsensusPower(ctx, 2)
624624
valAddr1, err1 := sdk.ValAddressFromBech32(addrVal)
625625
assert.NilError(t, err1)
626-
_, _, err := f.stakingKeeper.Undelegate(ctx, addrAcc, valAddr1, types.FlexiblePeriodDelegationID, math.LegacyNewDecFromInt(unbondingTokens))
626+
_, _, err := f.stakingKeeper.Undelegate(ctx, addrAcc, valAddr1, types.FlexiblePeriodDelegationID, math.LegacyNewDecFromInt(unbondingTokens), math.LegacyNewDecFromInt(unbondingTokens).Quo(math.LegacyNewDec(2)))
627627
assert.NilError(t, err)
628628
valAddr2, err1 := sdk.ValAddressFromBech32(addrVal2)
629629
assert.NilError(t, err1)
630-
_, _, err = f.stakingKeeper.Undelegate(ctx, addrAcc, valAddr2, types.FlexiblePeriodDelegationID, math.LegacyNewDecFromInt(unbondingTokens))
630+
_, _, err = f.stakingKeeper.Undelegate(ctx, addrAcc, valAddr2, types.FlexiblePeriodDelegationID, math.LegacyNewDecFromInt(unbondingTokens), math.LegacyNewDecFromInt(unbondingTokens).Quo(math.LegacyNewDec(2)))
631631
assert.NilError(t, err)
632632

633633
unbond, found := f.stakingKeeper.GetUnbondingDelegation(ctx, addrAcc, valAddr1)
@@ -818,7 +818,7 @@ func TestGRPCQueryRedelegations(t *testing.T) {
818818
val2bz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(val2.GetOperator())
819819
assert.NilError(t, err)
820820

821-
_, err = f.stakingKeeper.BeginRedelegation(ctx, addrAcc1, val1bz, val2bz, types.FlexiblePeriodDelegationID, math.LegacyNewDecFromInt(rdAmount))
821+
_, _, err = f.stakingKeeper.BeginRedelegation(ctx, addrAcc1, val1bz, val2bz, types.FlexiblePeriodDelegationID, math.LegacyNewDecFromInt(rdAmount), math.LegacyNewDecFromInt(rdAmount).Quo(math.LegacyNewDec(2)))
822822
assert.NilError(t, err)
823823
applyValidatorSetUpdates(t, ctx, f.stakingKeeper, -1)
824824

@@ -933,7 +933,7 @@ func TestGRPCQueryValidatorUnbondingDelegations(t *testing.T) {
933933
undelAmount := f.stakingKeeper.TokensFromConsensusPower(ctx, 2)
934934
valbz, err := f.stakingKeeper.ValidatorAddressCodec().StringToBytes(val1.GetOperator())
935935
assert.NilError(t, err)
936-
_, _, err = f.stakingKeeper.Undelegate(ctx, addrAcc1, valbz, types.FlexiblePeriodDelegationID, math.LegacyNewDecFromInt(undelAmount))
936+
_, _, err = f.stakingKeeper.Undelegate(ctx, addrAcc1, valbz, types.FlexiblePeriodDelegationID, math.LegacyNewDecFromInt(undelAmount), math.LegacyNewDecFromInt(undelAmount).Quo(math.LegacyNewDec(2)))
937937
assert.NilError(t, err)
938938
applyValidatorSetUpdates(t, ctx, f.stakingKeeper, -1)
939939

tests/integration/staking/keeper/unbonding_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func doUnbondingDelegation(
110110

111111
var err error
112112
undelegateAmount := math.LegacyNewDec(1)
113-
completionTime, undelegatedAmount, err := stakingKeeper.Undelegate(ctx, addrDels[0], addrVals[0], types.FlexiblePeriodDelegationID, undelegateAmount)
113+
completionTime, undelegatedAmount, err := stakingKeeper.Undelegate(ctx, addrDels[0], addrVals[0], types.FlexiblePeriodDelegationID, undelegateAmount, undelegateAmount.Quo(math.LegacyNewDec(2)))
114114
assert.NilError(t, err)
115115
assert.Assert(t, undelegateAmount.Equal(math.LegacyNewDecFromInt(undelegatedAmount)))
116116
// check that the unbonding actually happened
@@ -141,7 +141,7 @@ func doRedelegation(
141141
hookCalled *bool,
142142
) (completionTime time.Time) {
143143
var err error
144-
completionTime, err = stakingKeeper.BeginRedelegation(ctx, addrDels[0], addrVals[0], addrVals[1], types.FlexiblePeriodDelegationID, math.LegacyNewDec(1))
144+
completionTime, _, err = stakingKeeper.BeginRedelegation(ctx, addrDels[0], addrVals[0], addrVals[1], types.FlexiblePeriodDelegationID, math.LegacyNewDec(1), math.LegacyNewDec(1).Quo(math.LegacyNewDec(2)))
145145
assert.NilError(t, err)
146146

147147
// Check that the redelegation happened- we look up the entry and see that it has the correct number of shares

tests/integration/staking/keeper/validator_bench_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ func BenchmarkGetValidatorDelegationsLegacy(b *testing.B) {
115115
}
116116

117117
periodDel := types.NewPeriodDelegation(
118+
delegator.String(),
119+
val.String(),
118120
types.FlexiblePeriodDelegationID,
119121
math.LegacyNewDec(int64(i)),
120122
math.LegacyNewDec(int64(i)),

types/mempool/mempool_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,4 @@ func unmarshalTx(txBytes []byte) (sdk.Tx, error) {
240240
return cfg.TxConfig.TxJSONDecoder()(txBytes)
241241
}
242242

243-
var (
244-
msgWithdrawDelegatorReward = []byte("{\"body\":{\"messages\":[{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1lzhlnpahvznwfv4jmay2tgaha5kmz5qxerarrl\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1sjllsnramtg3ewxqwwrwjxfgc4n4ef9u2lcnj0\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper196ax4vc0lwpxndu9dyhvca7jhxp70rmcvrj90c\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1k2d9ed9vgfuk2m58a2d80q9u6qljkh4vfaqjfq\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1vygmh344ldv9qefss9ek7ggsnxparljlmj56q5\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1ej2es5fjztqjcd4pwa0zyvaevtjd2y5wxxp9gd\"}],\"memo\":\"\",\"timeout_height\":\"0\",\"extension_options\":[],\"non_critical_extension_options\":[]},\"auth_info\":{\"signer_infos\":[{\"public_key\":{\"@type\":\"\\/cosmos.crypto.secp256k1.PubKey\",\"key\":\"AmbXAy10a0SerEefTYQzqyGQdX5kiTEWJZ1PZKX1oswX\"},\"mode_info\":{\"single\":{\"mode\":\"SIGN_MODE_LEGACY_AMINO_JSON\"}},\"sequence\":\"119\"}],\"fee\":{\"amount\":[{\"denom\":\"uatom\",\"amount\":\"15968\"}],\"gas_limit\":\"638717\",\"payer\":\"\",\"granter\":\"\"}},\"signatures\":[\"ji+inUo4xGlN9piRQLdLCeJWa7irwnqzrMVPcmzJyG5y6NPc+ZuNaIc3uvk5NLDJytRB8AHX0GqNETR\\/Q8fz4Q==\"]}")
245-
)
243+
var msgWithdrawDelegatorReward = []byte("{\"body\":{\"messages\":[{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1lzhlnpahvznwfv4jmay2tgaha5kmz5qxerarrl\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1sjllsnramtg3ewxqwwrwjxfgc4n4ef9u2lcnj0\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper196ax4vc0lwpxndu9dyhvca7jhxp70rmcvrj90c\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1k2d9ed9vgfuk2m58a2d80q9u6qljkh4vfaqjfq\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1vygmh344ldv9qefss9ek7ggsnxparljlmj56q5\"},{\"@type\":\"\\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward\",\"delegator_address\":\"cosmos16w6g0whmw703t8h2m9qmq2fd9dwaw6fjszzjsw\",\"validator_address\":\"cosmosvaloper1ej2es5fjztqjcd4pwa0zyvaevtjd2y5wxxp9gd\"}],\"memo\":\"\",\"timeout_height\":\"0\",\"extension_options\":[],\"non_critical_extension_options\":[]},\"auth_info\":{\"signer_infos\":[{\"public_key\":{\"@type\":\"\\/cosmos.crypto.secp256k1.PubKey\",\"key\":\"AmbXAy10a0SerEefTYQzqyGQdX5kiTEWJZ1PZKX1oswX\"},\"mode_info\":{\"single\":{\"mode\":\"SIGN_MODE_LEGACY_AMINO_JSON\"}},\"sequence\":\"119\"}],\"fee\":{\"amount\":[{\"denom\":\"uatom\",\"amount\":\"15968\"}],\"gas_limit\":\"638717\",\"payer\":\"\",\"granter\":\"\"}},\"signatures\":[\"ji+inUo4xGlN9piRQLdLCeJWa7irwnqzrMVPcmzJyG5y6NPc+ZuNaIc3uvk5NLDJytRB8AHX0GqNETR\\/Q8fz4Q==\"]}")

x/distribution/keeper/grpc_query.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ func (k Querier) DelegatorValidators(ctx context.Context, req *types.QueryDelega
331331
return false
332332
},
333333
)
334-
335334
if err != nil {
336335
return nil, err
337336
}

x/distribution/keeper/ubi.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55

66
"cosmossdk.io/math"
7+
78
sdk "github.com/cosmos/cosmos-sdk/types"
89
"github.com/cosmos/cosmos-sdk/x/distribution/types"
910
)
@@ -17,7 +18,7 @@ func (k Keeper) GetUbiBalanceByDenom(ctx context.Context, denom string) (math.In
1718
return feePool.Ubi.AmountOf(denom).TruncateInt(), nil
1819
}
1920

20-
func (k Keeper) WithdrawUbiByDenomToModule(ctx context.Context, denom string, recipientModule string) (sdk.Coin, error) {
21+
func (k Keeper) WithdrawUbiByDenomToModule(ctx context.Context, denom, recipientModule string) (sdk.Coin, error) {
2122
feePool, err := k.FeePool.Get(ctx)
2223
if err != nil {
2324
return sdk.Coin{}, err

x/gov/keeper/tally.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ func (keeper Keeper) Tally(ctx context.Context, proposal v1.Proposal) (passes, b
9191

9292
return false, keeper.Votes.Remove(ctx, collections.Join(vote.ProposalId, sdk.AccAddress(voter)))
9393
})
94-
9594
if err != nil {
9695
return false, false, tallyResults, err
9796
}

x/group/simulation/operations.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,6 @@ func SimulateMsgWithdrawProposal(
958958
}
959959

960960
_, _, err = app.SimDeliver(txGen.TxEncoder(), tx)
961-
962961
if err != nil {
963962
if strings.Contains(err.Error(), "group was modified") || strings.Contains(err.Error(), "group policy was modified") {
964963
return simtypes.NoOpMsg(group.ModuleName, sdk.MsgTypeURL(msg), "no-op:group/group-policy was modified"), nil, nil
@@ -1066,7 +1065,6 @@ func SimulateMsgVote(
10661065
}
10671066

10681067
_, _, err = app.SimDeliver(txGen.TxEncoder(), tx)
1069-
10701068
if err != nil {
10711069
if strings.Contains(err.Error(), "group was modified") || strings.Contains(err.Error(), "group policy was modified") {
10721070
return simtypes.NoOpMsg(group.ModuleName, sdk.MsgTypeURL(msg), "no-op:group/group-policy was modified"), nil, nil

0 commit comments

Comments
 (0)