From 0f84b52c85e2fa31a5be7421b76fd89d33f19838 Mon Sep 17 00:00:00 2001 From: Daniel T <30197399+danwt@users.noreply.github.com> Date: Wed, 3 Jul 2024 11:20:32 +0100 Subject: [PATCH] fix(rollapp): pass client keeper to ra keeper (#973) --- app/app.go | 2 +- testutil/keeper/rollapp.go | 2 +- x/rollapp/keeper/keeper.go | 13 +++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/app.go b/app/app.go index 4e9242a32..615131a06 100644 --- a/app/app.go +++ b/app/app.go @@ -610,7 +610,7 @@ func New( ), ) - app.RollappKeeper = *rollappmodulekeeper.NewKeeper(appCodec, keys[rollappmoduletypes.StoreKey], app.GetSubspace(rollappmoduletypes.ModuleName), app.IBCKeeper.ChannelKeeper) + app.RollappKeeper = *rollappmodulekeeper.NewKeeper(appCodec, keys[rollappmoduletypes.StoreKey], app.GetSubspace(rollappmoduletypes.ModuleName), app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ClientKeeper) // Create Transfer Keepers app.TransferKeeper = ibctransferkeeper.NewKeeper( diff --git a/testutil/keeper/rollapp.go b/testutil/keeper/rollapp.go index 2820816ad..129f0c240 100644 --- a/testutil/keeper/rollapp.go +++ b/testutil/keeper/rollapp.go @@ -38,7 +38,7 @@ func RollappKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { memStoreKey, "RollappParams", ) - k := keeper.NewKeeper(cdc, storeKey, paramsSubspace, nil) + k := keeper.NewKeeper(cdc, storeKey, paramsSubspace, nil, nil) ctx := sdk.NewContext(stateStore, tmproto.Header{}, false, log.NewNopLogger()) diff --git a/x/rollapp/keeper/keeper.go b/x/rollapp/keeper/keeper.go index 97d93f437..c52088861 100644 --- a/x/rollapp/keeper/keeper.go +++ b/x/rollapp/keeper/keeper.go @@ -23,18 +23,19 @@ type Keeper struct { channelKeeper types.ChannelKeeper } -func NewKeeper(cdc codec.BinaryCodec, storeKey storetypes.StoreKey, ps paramtypes.Subspace, channelKeeper types.ChannelKeeper) *Keeper { +func NewKeeper(cdc codec.BinaryCodec, storeKey storetypes.StoreKey, ps paramtypes.Subspace, channelKeeper types.ChannelKeeper, ibcclientKeeper types.IBCClientKeeper) *Keeper { // set KeyTable if it has not already been set if !ps.HasKeyTable() { ps = ps.WithKeyTable(types.ParamKeyTable()) } return &Keeper{ - cdc: cdc, - storeKey: storeKey, - paramstore: ps, - hooks: nil, - channelKeeper: channelKeeper, + cdc: cdc, + storeKey: storeKey, + paramstore: ps, + hooks: nil, + channelKeeper: channelKeeper, + ibcClientKeeper: ibcclientKeeper, } }