Skip to content

Commit

Permalink
chore(network): remove DefaultConfigWithAppConfigWithQueryGasLimit (#…
Browse files Browse the repository at this point in the history
…21055)

(cherry picked from commit cc5c4d0)
  • Loading branch information
julienrbrt authored and mergify[bot] committed Jul 26, 2024
1 parent 0ce6fea commit ec8af5e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
5 changes: 3 additions & 2 deletions tests/integration/server/grpc/out_of_gas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
_ "cosmossdk.io/x/consensus"
_ "cosmossdk.io/x/staking"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/testutil/configurator"
"github.com/cosmos/cosmos-sdk/testutil/network"
Expand All @@ -36,15 +37,15 @@ func (s *IntegrationTestOutOfGasSuite) SetupSuite() {
var err error
s.T().Log("setting up integration test suite")

s.cfg, err = network.DefaultConfigWithAppConfigWithQueryGasLimit(configurator.NewAppConfig(
s.cfg, err = network.DefaultConfigWithAppConfig(configurator.NewAppConfig(
configurator.AccountsModule(),
configurator.AuthModule(),
configurator.BankModule(),
configurator.GenutilModule(),
configurator.StakingModule(),
configurator.ConsensusModule(),
configurator.TxModule(),
), 10)
), baseapp.SetQueryGasLimit(10))
s.NoError(err)
s.cfg.NumValidators = 1

Expand Down
15 changes: 6 additions & 9 deletions testutil/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,7 @@ func DefaultConfig(factory TestFixtureFactory) Config {
}
}

func DefaultConfigWithAppConfig(appConfig depinject.Config) (Config, error) {
return DefaultConfigWithAppConfigWithQueryGasLimit(appConfig, 0)
}

func DefaultConfigWithAppConfigWithQueryGasLimit(appConfig depinject.Config, queryGasLimit uint64) (Config, error) {
func DefaultConfigWithAppConfig(appConfig depinject.Config, baseappOpts ...func(*baseapp.BaseApp)) (Config, error) {
var (
appBuilder *runtime.AppBuilder
txConfig client.TxConfig
Expand Down Expand Up @@ -222,10 +218,11 @@ func DefaultConfigWithAppConfigWithQueryGasLimit(appConfig depinject.Config, que
app := appBuilder.Build(
dbm.NewMemDB(),
nil,
baseapp.SetPruning(pruningtypes.NewPruningOptionsFromString(val.GetAppConfig().Pruning)),
baseapp.SetMinGasPrices(val.GetAppConfig().MinGasPrices),
baseapp.SetChainID(cfg.ChainID),
baseapp.SetQueryGasLimit(queryGasLimit),
append(baseappOpts,
baseapp.SetPruning(pruningtypes.NewPruningOptionsFromString(val.GetAppConfig().Pruning)),
baseapp.SetMinGasPrices(val.GetAppConfig().MinGasPrices),
baseapp.SetChainID(cfg.ChainID),
)...,
)

testdata.RegisterQueryServer(app.GRPCQueryRouter(), testdata.QueryImpl{})
Expand Down

0 comments on commit ec8af5e

Please sign in to comment.