Fix simapp compilation

The WormholeKeeper is just set to nil so we don't incur a circular
dependency. The simapp test doesn't use that keeper anyway
This commit is contained in:
Csongor Kiss 2022-07-22 14:01:18 -05:00 committed by Csongor Kiss
parent 5d5267d9ac
commit abbed8593e
1 changed files with 4 additions and 2 deletions

View File

@ -242,7 +242,8 @@ func NewSimApp(
appCodec, keys[banktypes.StoreKey], app.AccountKeeper, app.GetSubspace(banktypes.ModuleName), app.ModuleAccountAddrs(), appCodec, keys[banktypes.StoreKey], app.AccountKeeper, app.GetSubspace(banktypes.ModuleName), app.ModuleAccountAddrs(),
) )
stakingKeeper := stakingkeeper.NewKeeper( stakingKeeper := stakingkeeper.NewKeeper(
appCodec, keys[stakingtypes.StoreKey], app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName), // we set the WormholeKeeper to nil because it's not used for simapp and this way the circular dependency is avoided
appCodec, keys[stakingtypes.StoreKey], app.AccountKeeper, app.BankKeeper, nil, app.GetSubspace(stakingtypes.ModuleName),
) )
app.MintKeeper = mintkeeper.NewKeeper( app.MintKeeper = mintkeeper.NewKeeper(
appCodec, keys[minttypes.StoreKey], app.GetSubspace(minttypes.ModuleName), &stakingKeeper, appCodec, keys[minttypes.StoreKey], app.GetSubspace(minttypes.ModuleName), &stakingKeeper,
@ -317,7 +318,8 @@ func NewSimApp(
mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper),
slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), // we set the WormholeKeeper to nil because it's not used for simapp and this way the circular dependency is avoided
staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, nil),
upgrade.NewAppModule(app.UpgradeKeeper), upgrade.NewAppModule(app.UpgradeKeeper),
evidence.NewAppModule(app.EvidenceKeeper), evidence.NewAppModule(app.EvidenceKeeper),
params.NewAppModule(app.ParamsKeeper), params.NewAppModule(app.ParamsKeeper),