Skip to content

Commit

Permalink
Showing 2 changed files with 13 additions and 12 deletions.
10 changes: 0 additions & 10 deletions app/app.go
Original file line number Diff line number Diff line change
@@ -346,16 +346,6 @@ func (app *App) RegisterNodeService(clientCtx client.Context) {

// TestingApp functions

// GetBaseApp implements the TestingApp interface.
func (app *App) GetBaseApp() *baseapp.BaseApp {
return app.BaseApp
}

// GetTxConfig implements the TestingApp interface.
func (app *App) GetTxConfig() client.TxConfig {
return MakeEncodingConfig().TxConfig
}

// GetModules implements the TestingApp interface.
func (app *App) GetModules() map[string]module.AppModule {
return app.mm.Modules
15 changes: 13 additions & 2 deletions testutil/helpers/test_helpers.go
Original file line number Diff line number Diff line change
@@ -434,6 +434,17 @@ func GenTx(gen client.TxConfig, msgs []sdk.Msg, gasPrice sdk.Coin, gas uint64, c

type TestingApp struct {
*app.App
TxConfig client.TxConfig
}

// GetBaseApp implements the TestingApp interface.
func (app *TestingApp) GetBaseApp() *baseapp.BaseApp {
return app.BaseApp
}

// GetTxConfig implements the TestingApp interface.
func (app *TestingApp) GetTxConfig() client.TxConfig {
return app.TxConfig
}

func (app *TestingApp) GetStakingKeeper() ibctestingtypes.StakingKeeper {
@@ -451,9 +462,9 @@ func (app *TestingApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper {
// SetupTestingApp initializes the IBC-go testing application
func SetupTestingApp() (ibctesting.TestingApp, map[string]json.RawMessage) {
cfg := app.MakeEncodingConfig()
resultApp := app.New(log.NewNopLogger(), dbm.NewMemDB(),
myApp := app.New(log.NewNopLogger(), dbm.NewMemDB(),
nil, true, map[int64]bool{}, os.TempDir(), 5, cfg, simapp.EmptyAppOptions{})
testingApp := &TestingApp{resultApp}
testingApp := &TestingApp{App: myApp, TxConfig: cfg.TxConfig}
return testingApp, app.NewDefAppGenesisByDenom(fxtypes.DefaultDenom, cfg.Codec)
}

0 comments on commit 1f04e7a

Please sign in to comment.