diff --git a/simapp/sim_bench_test.go b/simapp/sim_bench_test.go index be559a51ea..8a7b46a2b7 100644 --- a/simapp/sim_bench_test.go +++ b/simapp/sim_bench_test.go @@ -52,7 +52,7 @@ func BenchmarkFullAppSimulation(b *testing.B) { AppStateFn(app.AppCodec(), app.SimulationManager()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 simtestutil.SimulationOperations(app, app.AppCodec(), config), - ModuleAccountAddrs(), + BlockedAddresses(), config, app.AppCodec(), ) @@ -107,7 +107,7 @@ func BenchmarkInvariants(b *testing.B) { AppStateFn(app.AppCodec(), app.SimulationManager()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 simtestutil.SimulationOperations(app, app.AppCodec(), config), - ModuleAccountAddrs(), + BlockedAddresses(), config, app.AppCodec(), ) diff --git a/simapp/sim_test.go b/simapp/sim_test.go index d8206f5750..8bf215bf5d 100644 --- a/simapp/sim_test.go +++ b/simapp/sim_test.go @@ -95,7 +95,7 @@ func TestFullAppSimulation(t *testing.T) { AppStateFn(app.AppCodec(), app.SimulationManager()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 simtestutil.SimulationOperations(app, app.AppCodec(), config), - ModuleAccountAddrs(), + BlockedAddresses(), config, app.AppCodec(), ) @@ -140,7 +140,7 @@ func TestAppImportExport(t *testing.T) { AppStateFn(app.AppCodec(), app.SimulationManager()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 simtestutil.SimulationOperations(app, app.AppCodec(), config), - ModuleAccountAddrs(), + BlockedAddresses(), config, app.AppCodec(), ) @@ -257,7 +257,7 @@ func TestAppSimulationAfterImport(t *testing.T) { AppStateFn(app.AppCodec(), app.SimulationManager()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 simtestutil.SimulationOperations(app, app.AppCodec(), config), - ModuleAccountAddrs(), + BlockedAddresses(), config, app.AppCodec(), ) @@ -305,7 +305,7 @@ func TestAppSimulationAfterImport(t *testing.T) { AppStateFn(app.AppCodec(), app.SimulationManager()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 simtestutil.SimulationOperations(newApp, newApp.AppCodec(), config), - ModuleAccountAddrs(), + BlockedAddresses(), config, app.AppCodec(), ) @@ -360,7 +360,7 @@ func TestAppStateDeterminism(t *testing.T) { AppStateFn(app.AppCodec(), app.SimulationManager()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 simtestutil.SimulationOperations(app, app.AppCodec(), config), - ModuleAccountAddrs(), + BlockedAddresses(), config, app.AppCodec(), ) diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index 96d7c8698e..a9d35b843f 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -14,7 +14,6 @@ import ( tmtypes "github.com/tendermint/tendermint/types" dbm "github.com/tendermint/tm-db" - "cosmossdk.io/depinject" "cosmossdk.io/math" bam "github.com/cosmos/cosmos-sdk/baseapp" @@ -29,7 +28,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module/testutil" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" ) @@ -217,18 +215,6 @@ func initAccountWithCoins(app *SimApp, ctx sdk.Context, addr sdk.AccAddress, coi } } -// ModuleAccountAddrs provides a list of blocked module accounts from configuration in AppConfig -// -// Ported from SimApp -func ModuleAccountAddrs() map[string]bool { - var bk bankkeeper.Keeper - err := depinject.Inject(AppConfig, &bk) - if err != nil { - panic("unable to load DI container") - } - return bk.GetBlockedAddresses() -} - // NewTestNetworkFixture returns a new simapp AppConstructor for network simulation tests func NewTestNetworkFixture() network.TestFixture { dir, err := os.MkdirTemp("", "simapp")