From 7bafb47c11f0f88b7b572e139f31d896643d6194 Mon Sep 17 00:00:00 2001 From: anilCSE Date: Wed, 20 Apr 2022 20:14:20 +0530 Subject: [PATCH 1/3] rename helpers.GenTx to helpers.GenerateSignedTx --- simapp/helpers/test_helpers.go | 4 ++-- simapp/test_helpers.go | 4 ++-- x/authz/simulation/operations.go | 6 +++--- x/bank/simulation/operations.go | 4 ++-- x/genutil/gentx_test.go | 2 +- x/gov/simulation/operations.go | 2 +- x/group/simulation/operations.go | 28 ++++++++++++++-------------- x/nft/simulation/operations.go | 2 +- x/simulation/util.go | 2 +- x/slashing/simulation/operations.go | 2 +- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/simapp/helpers/test_helpers.go b/simapp/helpers/test_helpers.go index 2d02d58dedd..20974d8897f 100644 --- a/simapp/helpers/test_helpers.go +++ b/simapp/helpers/test_helpers.go @@ -18,8 +18,8 @@ const ( SimAppChainID = "simulation-app" ) -// GenTx generates a signed mock transaction. -func GenTx(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, accSeqs []uint64, priv ...cryptotypes.PrivKey) (sdk.Tx, error) { +// GenerateSignedTx generates a signed mock transaction. +func GenerateSignedTx(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, accSeqs []uint64, priv ...cryptotypes.PrivKey) (sdk.Tx, error) { sigs := make([]signing.SignatureV2, len(priv)) // create a random length memo diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index 364891a5f0c..2696153d94c 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -412,7 +412,7 @@ func SignCheckDeliver( chainID string, accNums, accSeqs []uint64, expSimPass, expPass bool, priv ...cryptotypes.PrivKey, ) (sdk.GasInfo, *sdk.Result, error) { - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txCfg, msgs, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)}, @@ -462,7 +462,7 @@ func GenSequenceOfTxs(txGen client.TxConfig, msgs []sdk.Msg, accNums []uint64, i txs := make([]sdk.Tx, numToGenerate) var err error for i := 0; i < numToGenerate; i++ { - txs[i], err = helpers.GenTx( + txs[i], err = helpers.GenerateSignedTx( txGen, msgs, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)}, diff --git a/x/authz/simulation/operations.go b/x/authz/simulation/operations.go index d62f698ae7b..a6ebe58c0b6 100644 --- a/x/authz/simulation/operations.go +++ b/x/authz/simulation/operations.go @@ -117,7 +117,7 @@ func SimulateMsgGrant(ak authz.AccountKeeper, bk authz.BankKeeper, _ keeper.Keep return simtypes.NoOpMsg(authz.ModuleName, TypeMsgGrant, err.Error()), nil, err } txCfg := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txCfg, []sdk.Msg{msg}, fees, @@ -187,7 +187,7 @@ func SimulateMsgRevoke(ak authz.AccountKeeper, bk authz.BankKeeper, k keeper.Kee msg := authz.NewMsgRevoke(granterAddr, granteeAddr, a.MsgTypeURL()) txCfg := simappparams.MakeTestEncodingConfig().TxConfig account := ak.GetAccount(ctx, granterAddr) - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txCfg, []sdk.Msg{&msg}, fees, @@ -276,7 +276,7 @@ func SimulateMsgExec(ak authz.AccountKeeper, bk authz.BankKeeper, k keeper.Keepe txCfg := simappparams.MakeTestEncodingConfig().TxConfig granteeAcc := ak.GetAccount(ctx, granteeAddr) - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txCfg, []sdk.Msg{&msgExec}, fees, diff --git a/x/bank/simulation/operations.go b/x/bank/simulation/operations.go index 96b0d3d2ad8..a10c1d2cf8f 100644 --- a/x/bank/simulation/operations.go +++ b/x/bank/simulation/operations.go @@ -138,7 +138,7 @@ func sendMsgSend( } } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txGen, []sdk.Msg{msg}, fees, @@ -360,7 +360,7 @@ func sendMsgMultiSend( } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txGen, []sdk.Msg{msg}, fees, diff --git a/x/genutil/gentx_test.go b/x/genutil/gentx_test.go index b08ecb9750f..865dc180a50 100644 --- a/x/genutil/gentx_test.go +++ b/x/genutil/gentx_test.go @@ -234,7 +234,7 @@ func (suite *GenTxTestSuite) TestDeliverGenTxs() { _ = suite.setAccountBalance(addr2, 0) msg := banktypes.NewMsgSend(addr1, addr2, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 1)}) - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( suite.encodingConfig.TxConfig, []sdk.Msg{msg}, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 10)}, diff --git a/x/gov/simulation/operations.go b/x/gov/simulation/operations.go index 08637c8f67f..2fc9e4457bf 100644 --- a/x/gov/simulation/operations.go +++ b/x/gov/simulation/operations.go @@ -170,7 +170,7 @@ func SimulateMsgSubmitProposal( } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txGen, []sdk.Msg{msg}, fees, diff --git a/x/group/simulation/operations.go b/x/group/simulation/operations.go index 98e04352bc2..0610f9e0f2e 100644 --- a/x/group/simulation/operations.go +++ b/x/group/simulation/operations.go @@ -258,7 +258,7 @@ func SimulateMsgCreateGroup(ak group.AccountKeeper, bk group.BankKeeper) simtype msg := &group.MsgCreateGroup{Admin: accAddr, Members: members, Metadata: simtypes.RandStringOfLength(r, 10)} txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txGen, []sdk.Msg{msg}, fees, @@ -316,7 +316,7 @@ func SimulateMsgCreateGroupWithPolicy(ak group.AccountKeeper, bk group.BankKeepe } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txGen, []sdk.Msg{msg}, fees, @@ -374,7 +374,7 @@ func SimulateMsgCreateGroupPolicy(ak group.AccountKeeper, bk group.BankKeeper, k } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txGen, []sdk.Msg{msg}, fees, @@ -448,7 +448,7 @@ func SimulateMsgSubmitProposal(ak group.AccountKeeper, bk group.BankKeeper, k ke } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txGen, []sdk.Msg{&msg}, fees, @@ -506,7 +506,7 @@ func SimulateMsgUpdateGroupAdmin(ak group.AccountKeeper, bk group.BankKeeper, k } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txGen, []sdk.Msg{&msg}, fees, @@ -555,7 +555,7 @@ func SimulateMsgUpdateGroupMetadata(ak group.AccountKeeper, bk group.BankKeeper, } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txGen, []sdk.Msg{&msg}, fees, @@ -632,7 +632,7 @@ func SimulateMsgUpdateGroupMembers(ak group.AccountKeeper, } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txGen, []sdk.Msg{&msg}, fees, @@ -690,7 +690,7 @@ func SimulateMsgUpdateGroupPolicyAdmin(ak group.AccountKeeper, bk group.BankKeep } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txGen, []sdk.Msg{&msg}, fees, @@ -749,7 +749,7 @@ func SimulateMsgUpdateGroupPolicyDecisionPolicy(ak group.AccountKeeper, } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txGen, []sdk.Msg{msg}, fees, @@ -798,7 +798,7 @@ func SimulateMsgUpdateGroupPolicyMetadata(ak group.AccountKeeper, } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txGen, []sdk.Msg{&msg}, fees, @@ -898,7 +898,7 @@ func SimulateMsgWithdrawProposal(ak group.AccountKeeper, } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txGen, []sdk.Msg{&msg}, fees, @@ -1002,7 +1002,7 @@ func SimulateMsgVote(ak group.AccountKeeper, Metadata: simtypes.RandStringOfLength(r, 10), } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txGen, []sdk.Msg{&msg}, fees, @@ -1078,7 +1078,7 @@ func SimulateMsgExec(ak group.AccountKeeper, Executor: acc.Address.String(), } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txGen, []sdk.Msg{&msg}, fees, @@ -1140,7 +1140,7 @@ func SimulateMsgLeaveGroup(k keeper.Keeper, ak group.AccountKeeper, bk group.Ban } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txGen, []sdk.Msg{msg}, fees, diff --git a/x/nft/simulation/operations.go b/x/nft/simulation/operations.go index 57cf714a182..ef2b2fd2277 100644 --- a/x/nft/simulation/operations.go +++ b/x/nft/simulation/operations.go @@ -99,7 +99,7 @@ func SimulateMsgSend( } txCfg := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txCfg, []sdk.Msg{msg}, fees, diff --git a/x/simulation/util.go b/x/simulation/util.go index f32e1bdf6bd..aebbdcdd000 100644 --- a/x/simulation/util.go +++ b/x/simulation/util.go @@ -100,7 +100,7 @@ func GenAndDeliverTxWithRandFees(txCtx OperationInput) (simtypes.OperationMsg, [ // GenAndDeliverTx generates a transactions and delivers it. func GenAndDeliverTx(txCtx OperationInput, fees sdk.Coins) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { account := txCtx.AccountKeeper.GetAccount(txCtx.Context, txCtx.SimAccount.Address) - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txCtx.TxGen, []sdk.Msg{txCtx.Msg}, fees, diff --git a/x/slashing/simulation/operations.go b/x/slashing/simulation/operations.go index a4c82e0f4af..dc580ab4f99 100644 --- a/x/slashing/simulation/operations.go +++ b/x/slashing/simulation/operations.go @@ -89,7 +89,7 @@ func SimulateMsgUnjail(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Kee msg := types.NewMsgUnjail(validator.GetOperator()) txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenTx( + tx, err := helpers.GenerateSignedTx( txGen, []sdk.Msg{msg}, fees, From eb0e1dab078ad011380ff7269d5c8ed2bd4d0a58 Mon Sep 17 00:00:00 2001 From: anilCSE Date: Wed, 20 Apr 2022 20:15:51 +0530 Subject: [PATCH 2/3] rename --- simapp/helpers/test_helpers.go | 4 ++-- simapp/test_helpers.go | 4 ++-- x/authz/simulation/operations.go | 6 +++--- x/bank/simulation/operations.go | 4 ++-- x/genutil/gentx_test.go | 2 +- x/gov/simulation/operations.go | 2 +- x/group/simulation/operations.go | 28 ++++++++++++++-------------- x/nft/simulation/operations.go | 2 +- x/simulation/util.go | 2 +- x/slashing/simulation/operations.go | 2 +- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/simapp/helpers/test_helpers.go b/simapp/helpers/test_helpers.go index 20974d8897f..0dc88f9b462 100644 --- a/simapp/helpers/test_helpers.go +++ b/simapp/helpers/test_helpers.go @@ -18,8 +18,8 @@ const ( SimAppChainID = "simulation-app" ) -// GenerateSignedTx generates a signed mock transaction. -func GenerateSignedTx(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, accSeqs []uint64, priv ...cryptotypes.PrivKey) (sdk.Tx, error) { +// GenSignedMockTx generates a signed mock transaction. +func GenSignedMockTx(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, accSeqs []uint64, priv ...cryptotypes.PrivKey) (sdk.Tx, error) { sigs := make([]signing.SignatureV2, len(priv)) // create a random length memo diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index 2696153d94c..4fe0c2b4d87 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -412,7 +412,7 @@ func SignCheckDeliver( chainID string, accNums, accSeqs []uint64, expSimPass, expPass bool, priv ...cryptotypes.PrivKey, ) (sdk.GasInfo, *sdk.Result, error) { - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txCfg, msgs, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)}, @@ -462,7 +462,7 @@ func GenSequenceOfTxs(txGen client.TxConfig, msgs []sdk.Msg, accNums []uint64, i txs := make([]sdk.Tx, numToGenerate) var err error for i := 0; i < numToGenerate; i++ { - txs[i], err = helpers.GenerateSignedTx( + txs[i], err = helpers.GenSignedMockTx( txGen, msgs, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)}, diff --git a/x/authz/simulation/operations.go b/x/authz/simulation/operations.go index a6ebe58c0b6..a20c7f276ca 100644 --- a/x/authz/simulation/operations.go +++ b/x/authz/simulation/operations.go @@ -117,7 +117,7 @@ func SimulateMsgGrant(ak authz.AccountKeeper, bk authz.BankKeeper, _ keeper.Keep return simtypes.NoOpMsg(authz.ModuleName, TypeMsgGrant, err.Error()), nil, err } txCfg := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txCfg, []sdk.Msg{msg}, fees, @@ -187,7 +187,7 @@ func SimulateMsgRevoke(ak authz.AccountKeeper, bk authz.BankKeeper, k keeper.Kee msg := authz.NewMsgRevoke(granterAddr, granteeAddr, a.MsgTypeURL()) txCfg := simappparams.MakeTestEncodingConfig().TxConfig account := ak.GetAccount(ctx, granterAddr) - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txCfg, []sdk.Msg{&msg}, fees, @@ -276,7 +276,7 @@ func SimulateMsgExec(ak authz.AccountKeeper, bk authz.BankKeeper, k keeper.Keepe txCfg := simappparams.MakeTestEncodingConfig().TxConfig granteeAcc := ak.GetAccount(ctx, granteeAddr) - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txCfg, []sdk.Msg{&msgExec}, fees, diff --git a/x/bank/simulation/operations.go b/x/bank/simulation/operations.go index a10c1d2cf8f..8c0c94f0e62 100644 --- a/x/bank/simulation/operations.go +++ b/x/bank/simulation/operations.go @@ -138,7 +138,7 @@ func sendMsgSend( } } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txGen, []sdk.Msg{msg}, fees, @@ -360,7 +360,7 @@ func sendMsgMultiSend( } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txGen, []sdk.Msg{msg}, fees, diff --git a/x/genutil/gentx_test.go b/x/genutil/gentx_test.go index 865dc180a50..49462da12ce 100644 --- a/x/genutil/gentx_test.go +++ b/x/genutil/gentx_test.go @@ -234,7 +234,7 @@ func (suite *GenTxTestSuite) TestDeliverGenTxs() { _ = suite.setAccountBalance(addr2, 0) msg := banktypes.NewMsgSend(addr1, addr2, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 1)}) - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( suite.encodingConfig.TxConfig, []sdk.Msg{msg}, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 10)}, diff --git a/x/gov/simulation/operations.go b/x/gov/simulation/operations.go index 2fc9e4457bf..5963a2d2e6b 100644 --- a/x/gov/simulation/operations.go +++ b/x/gov/simulation/operations.go @@ -170,7 +170,7 @@ func SimulateMsgSubmitProposal( } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txGen, []sdk.Msg{msg}, fees, diff --git a/x/group/simulation/operations.go b/x/group/simulation/operations.go index 0610f9e0f2e..a81bf4925fb 100644 --- a/x/group/simulation/operations.go +++ b/x/group/simulation/operations.go @@ -258,7 +258,7 @@ func SimulateMsgCreateGroup(ak group.AccountKeeper, bk group.BankKeeper) simtype msg := &group.MsgCreateGroup{Admin: accAddr, Members: members, Metadata: simtypes.RandStringOfLength(r, 10)} txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txGen, []sdk.Msg{msg}, fees, @@ -316,7 +316,7 @@ func SimulateMsgCreateGroupWithPolicy(ak group.AccountKeeper, bk group.BankKeepe } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txGen, []sdk.Msg{msg}, fees, @@ -374,7 +374,7 @@ func SimulateMsgCreateGroupPolicy(ak group.AccountKeeper, bk group.BankKeeper, k } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txGen, []sdk.Msg{msg}, fees, @@ -448,7 +448,7 @@ func SimulateMsgSubmitProposal(ak group.AccountKeeper, bk group.BankKeeper, k ke } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txGen, []sdk.Msg{&msg}, fees, @@ -506,7 +506,7 @@ func SimulateMsgUpdateGroupAdmin(ak group.AccountKeeper, bk group.BankKeeper, k } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txGen, []sdk.Msg{&msg}, fees, @@ -555,7 +555,7 @@ func SimulateMsgUpdateGroupMetadata(ak group.AccountKeeper, bk group.BankKeeper, } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txGen, []sdk.Msg{&msg}, fees, @@ -632,7 +632,7 @@ func SimulateMsgUpdateGroupMembers(ak group.AccountKeeper, } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txGen, []sdk.Msg{&msg}, fees, @@ -690,7 +690,7 @@ func SimulateMsgUpdateGroupPolicyAdmin(ak group.AccountKeeper, bk group.BankKeep } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txGen, []sdk.Msg{&msg}, fees, @@ -749,7 +749,7 @@ func SimulateMsgUpdateGroupPolicyDecisionPolicy(ak group.AccountKeeper, } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txGen, []sdk.Msg{msg}, fees, @@ -798,7 +798,7 @@ func SimulateMsgUpdateGroupPolicyMetadata(ak group.AccountKeeper, } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txGen, []sdk.Msg{&msg}, fees, @@ -898,7 +898,7 @@ func SimulateMsgWithdrawProposal(ak group.AccountKeeper, } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txGen, []sdk.Msg{&msg}, fees, @@ -1002,7 +1002,7 @@ func SimulateMsgVote(ak group.AccountKeeper, Metadata: simtypes.RandStringOfLength(r, 10), } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txGen, []sdk.Msg{&msg}, fees, @@ -1078,7 +1078,7 @@ func SimulateMsgExec(ak group.AccountKeeper, Executor: acc.Address.String(), } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txGen, []sdk.Msg{&msg}, fees, @@ -1140,7 +1140,7 @@ func SimulateMsgLeaveGroup(k keeper.Keeper, ak group.AccountKeeper, bk group.Ban } txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txGen, []sdk.Msg{msg}, fees, diff --git a/x/nft/simulation/operations.go b/x/nft/simulation/operations.go index ef2b2fd2277..975fa57133e 100644 --- a/x/nft/simulation/operations.go +++ b/x/nft/simulation/operations.go @@ -99,7 +99,7 @@ func SimulateMsgSend( } txCfg := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txCfg, []sdk.Msg{msg}, fees, diff --git a/x/simulation/util.go b/x/simulation/util.go index aebbdcdd000..4b752609f09 100644 --- a/x/simulation/util.go +++ b/x/simulation/util.go @@ -100,7 +100,7 @@ func GenAndDeliverTxWithRandFees(txCtx OperationInput) (simtypes.OperationMsg, [ // GenAndDeliverTx generates a transactions and delivers it. func GenAndDeliverTx(txCtx OperationInput, fees sdk.Coins) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { account := txCtx.AccountKeeper.GetAccount(txCtx.Context, txCtx.SimAccount.Address) - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txCtx.TxGen, []sdk.Msg{txCtx.Msg}, fees, diff --git a/x/slashing/simulation/operations.go b/x/slashing/simulation/operations.go index dc580ab4f99..e2f3efd0284 100644 --- a/x/slashing/simulation/operations.go +++ b/x/slashing/simulation/operations.go @@ -89,7 +89,7 @@ func SimulateMsgUnjail(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Kee msg := types.NewMsgUnjail(validator.GetOperator()) txGen := simappparams.MakeTestEncodingConfig().TxConfig - tx, err := helpers.GenerateSignedTx( + tx, err := helpers.GenSignedMockTx( txGen, []sdk.Msg{msg}, fees, From b7687dfd04a900dbec341acbf6d3f3acd4df1718 Mon Sep 17 00:00:00 2001 From: anilCSE Date: Wed, 20 Apr 2022 20:21:51 +0530 Subject: [PATCH 3/3] add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c55fba21505..e7121f1d906 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -176,6 +176,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements +* [\#11696](https://github.com/cosmos/cosmos-sdk/pull/11696) Rename `helpers.GenTx` to `GenSignedMockTx` to avoid confusion with genutil's `GenTxCmd`. * (x/auth/vesting) [\#11652](https://github.com/cosmos/cosmos-sdk/pull/11652) Add util functions for `Period(s)` * [\#11630](https://github.com/cosmos/cosmos-sdk/pull/11630) Add SafeSub method to sdk.Coin. * [\#11511](https://github.com/cosmos/cosmos-sdk/pull/11511) Add api server flags to start command.