Skip to content

Commit

Permalink
update simulation test
Browse files Browse the repository at this point in the history
  • Loading branch information
avery committed Dec 19, 2024
1 parent ef12bd8 commit afe2bab
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 33 deletions.
4 changes: 0 additions & 4 deletions app/ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ func NewAnteHandler(options HandlerOptions) sdk.AnteHandler {

defer ethante.Recover(ctx.Logger(), &err)

if options.Simulate {
sim = true
}

txWithExtensions, ok := tx.(authante.HasExtensionOptionsTx)
if ok {
opts := txWithExtensions.GetExtensionOptions()
Expand Down
6 changes: 0 additions & 6 deletions app/ante/decorators.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,10 @@ func (vsd ValidateServiceDecorator) AnteHandle(
simulate bool,
next sdk.AnteHandler,
) (sdk.Context, error) {
<<<<<<< HEAD
if simulate {
return next(ctx, tx, simulate)
}
=======
if vsd.SimulateTest {
return next(ctx, tx, simulate)
}

>>>>>>> 684f3471c7649a941b8984dde1bebe293375e67a
for _, msg := range tx.GetMsgs() {
switch msg := msg.(type) {
case *servicetypes.MsgCallService:
Expand Down
4 changes: 0 additions & 4 deletions app/ante/handler_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ type HandlerOptions struct {
FeeMarketKeeper ethante.FeeMarketKeeper
BypassMinFeeMsgTypes []string
MaxTxGasWanted uint64
<<<<<<< HEAD
Simulate bool
=======
SimulationTest bool
>>>>>>> 684f3471c7649a941b8984dde1bebe293375e67a
}

// newCosmosAnteHandler creates the default ante handler for Ethereum transactions
Expand Down
5 changes: 0 additions & 5 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func NewIrisApp(
loadLatest bool,
encodingConfig params.EncodingConfig,
appOpts servertypes.AppOptions,
simulate bool,
baseAppOptions ...func(*baseapp.BaseApp),
) *IrisApp {
appCodec := encodingConfig.Marshaler
Expand Down Expand Up @@ -203,11 +202,7 @@ func NewIrisApp(
FeeMarketKeeper: app.FeeMarketKeeper,
BypassMinFeeMsgTypes: []string{},
MaxTxGasWanted: maxGasWanted,
<<<<<<< HEAD
Simulate: simulate,
=======
SimulationTest: simulationTest,
>>>>>>> 684f3471c7649a941b8984dde1bebe293375e67a
},
)

Expand Down
10 changes: 0 additions & 10 deletions app/sim_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,9 @@ func BenchmarkFullAppSimulation(b *testing.B) {
nil,
true,
encfg,
<<<<<<< HEAD
EmptyAppOptions{},
true,
=======
SimTestAppOptions{
options: map[string]interface{}{params.SimulationTest: true},
},
>>>>>>> 684f3471c7649a941b8984dde1bebe293375e67a
interBlockCacheOpt(),
)

Expand Down Expand Up @@ -127,14 +122,9 @@ func BenchmarkInvariants(b *testing.B) {
nil,
true,
encfg,
<<<<<<< HEAD
EmptyAppOptions{},
true,
=======
SimTestAppOptions{
options: map[string]interface{}{params.SimulationTest: true},
},
>>>>>>> 684f3471c7649a941b8984dde1bebe293375e67a
interBlockCacheOpt(),
)

Expand Down
4 changes: 1 addition & 3 deletions cmd/iris/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import (
// main function.
func NewRootCmd() (*cobra.Command, params.EncodingConfig) {

tempApplication := app.NewIrisApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, app.RegisterEncodingConfig(), testutil.EmptyAppOptions{}, false)
tempApplication := app.NewIrisApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, app.RegisterEncodingConfig(), testutil.EmptyAppOptions{})

encodingConfig := app.RegisterEncodingConfig()
initClientCtx := client.Context{}.
Expand Down Expand Up @@ -263,7 +263,6 @@ func (ac appCreator) newApp(
true,
ac.encCfg,
appOpts,
false,
baseappOptions...,
)
}
Expand Down Expand Up @@ -296,7 +295,6 @@ func (ac appCreator) appExport(
loadLatest,
ac.encCfg,
appOpts,
false,
)

if height != -1 {
Expand Down
1 change: 0 additions & 1 deletion testutil/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ func setup(
true,
encCdc,
appOpts,
true,
baseAppOptions...,
)
return &AppWrapper{app}
Expand Down

0 comments on commit afe2bab

Please sign in to comment.