diff --git a/helpers/test_helpers.go b/helpers/test_helpers.go index a9127a6fbd45..2341635eeea8 100644 --- a/helpers/test_helpers.go +++ b/helpers/test_helpers.go @@ -12,13 +12,16 @@ import ( ) // SimAppChainID hardcoded chainID for simulation -const SimAppChainID = "simulation-app" +const ( + DefaultGenTxGas = 1000000 + SimAppChainID = "simulation-app" +) // GenTx generates a signed mock transaction. -func GenTx(msgs []sdk.Msg, feeAmt sdk.Coins, chainID string, accnums []uint64, seq []uint64, priv ...crypto.PrivKey) auth.StdTx { +func GenTx(msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accnums []uint64, seq []uint64, priv ...crypto.PrivKey) auth.StdTx { fee := auth.StdFee{ Amount: feeAmt, - Gas: 1000000, // TODO: this should be a param + Gas: gas, } sigs := make([]auth.StdSignature, len(priv)) diff --git a/test_helpers.go b/test_helpers.go index 306b4259fb2d..0e6d22150255 100644 --- a/test_helpers.go +++ b/test_helpers.go @@ -120,6 +120,7 @@ func SignCheckDeliver( tx := helpers.GenTx( msgs, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)}, + helpers.DefaultGenTxGas, "", accNums, seq, @@ -163,6 +164,7 @@ func GenSequenceOfTxs(msgs []sdk.Msg, accNums []uint64, initSeqNums []uint64, nu txs[i] = helpers.GenTx( msgs, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)}, + helpers.DefaultGenTxGas, "", accNums, initSeqNums,