@@ -151,10 +151,9 @@ func SetupWithGenesisAccounts(genAccs []authtypes.GenesisAccount, balances ...ba
151
151
//
152
152
// CONTRACT: BeginBlock must be called before this function.
153
153
func SignAndDeliver (
154
- tb testing. TB , txCfg client.TxConfig , app * bam.BaseApp , msgs []sdk.Msg ,
155
- chainID string , accNums , accSeqs []uint64 , expPass bool , priv ... cryptotypes.PrivKey ,
154
+ txCfg client.TxConfig , app * bam.BaseApp , msgs []sdk.Msg ,
155
+ chainID string , accNums , accSeqs []uint64 , priv ... cryptotypes.PrivKey ,
156
156
) (sdk.GasInfo , * sdk.Result , error ) {
157
- tb .Helper ()
158
157
tx , err := simtestutil .GenSignedMockTx (
159
158
rand .New (rand .NewSource (time .Now ().UnixNano ())),
160
159
txCfg ,
@@ -166,18 +165,9 @@ func SignAndDeliver(
166
165
accSeqs ,
167
166
priv ... ,
168
167
)
169
- require .NoError (tb , err )
170
-
171
- // Simulate a sending a transaction
172
- gInfo , res , err := app .SimDeliver (txCfg .TxEncoder (), tx )
173
-
174
- if expPass {
175
- require .NoError (tb , err )
176
- require .NotNil (tb , res )
177
- } else {
178
- require .Error (tb , err )
179
- require .Nil (tb , res )
168
+ if err != nil {
169
+ return sdk.GasInfo {}, nil , err
180
170
}
181
171
182
- return gInfo , res , err
172
+ return app . SimDeliver ( txCfg . TxEncoder (), tx )
183
173
}
0 commit comments