diff --git a/x/apps/common_test.go b/x/apps/common_test.go index 342f8321d..c45ab7023 100644 --- a/x/apps/common_test.go +++ b/x/apps/common_test.go @@ -47,6 +47,16 @@ func makeTestCodec() *codec.Codec { return cdc } +type MockPocketKeeper struct { + +} + +func (m MockPocketKeeper) ClearSessionCache() { + return +} + +var _ types.PocketKeeper = MockPocketKeeper{} + func createTestInput(t *testing.T, isCheckTx bool) (sdk.Ctx, keeper.Keeper, types.AuthKeeper, types.PosKeeper) { initPower := int64(100000000000) nAccs := int64(4) @@ -98,7 +108,7 @@ func createTestInput(t *testing.T, isCheckTx bool) (sdk.Ctx, keeper.Keeper, type initialCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultStakeDenom, valTokens)) _ = createTestAccs(ctx, int(nAccs), initialCoins, &ak) - keeper := keeper.NewKeeper(cdc, appsKey, nk, ak, appSubspace, "apps") + keeper := keeper.NewKeeper(cdc, appsKey, nk, ak, MockPocketKeeper{}, appSubspace, "apps") p := types.DefaultParams() keeper.SetParams(ctx, p) return ctx, keeper, ak, nk diff --git a/x/nodes/keeper/common_test.go b/x/nodes/keeper/common_test.go index cb55e9a5d..07e5fb638 100644 --- a/x/nodes/keeper/common_test.go +++ b/x/nodes/keeper/common_test.go @@ -41,6 +41,14 @@ func makeTestCodec() *codec.Codec { return cdc } +type MockPocketKeeper struct{} + +func (m MockPocketKeeper) ClearSessionCache() { + return +} + +var _ types.PocketKeeper = MockPocketKeeper{} + // : deadcode unused func createTestInput(t *testing.T, isCheckTx bool) (sdk.Context, []auth.Account, Keeper) { initPower := int64(100000000000) @@ -90,6 +98,7 @@ func createTestInput(t *testing.T, isCheckTx bool) (sdk.Context, []auth.Account, initialCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultStakeDenom, valTokens)) accs := createTestAccs(ctx, int(nAccs), initialCoins, &ak) keeper := NewKeeper(cdc, keyPOS, ak, posSubspace, "pos") + keeper.PocketKeeper = MockPocketKeeper{} params := types.DefaultParams() keeper.SetParams(ctx, params) return ctx, accs, keeper diff --git a/x/pocketcore/common_test.go b/x/pocketcore/common_test.go index 1990094ef..62b5c07a5 100644 --- a/x/pocketcore/common_test.go +++ b/x/pocketcore/common_test.go @@ -122,9 +122,10 @@ func createTestInput(t *testing.T, isCheckTx bool) (sdk.Ctx, nodesKeeper.Keeper, pocketSubspace := sdk.NewSubspace(types.DefaultParamspace) ak := auth.NewKeeper(cdc, keyAcc, accSubspace, maccPerms) nk := nodesKeeper.NewKeeper(cdc, nodesKey, ak, nodesSubspace, "pos") - appk := appsKeeper.NewKeeper(cdc, appsKey, nk, ak, appSubspace, appsTypes.ModuleName) + appk := appsKeeper.NewKeeper(cdc, appsKey, nk, ak, nil, appSubspace, appsTypes.ModuleName) keeper := keep.NewKeeper(pocketKey, cdc, ak, nk, appk, &hb, pocketSubspace) kb := NewTestKeybase() + appk.PocketKeeper = keeper _, err = kb.Create("test") assert.Nil(t, err) _, err = kb.GetCoinbase() diff --git a/x/pocketcore/keeper/common_test.go b/x/pocketcore/keeper/common_test.go index 7d49418cd..d28d80c71 100644 --- a/x/pocketcore/keeper/common_test.go +++ b/x/pocketcore/keeper/common_test.go @@ -160,9 +160,10 @@ func createTestInput(t *testing.T, isCheckTx bool) (sdk.Ctx, []nodesTypes.Valida pocketSubspace := sdk.NewSubspace(types.DefaultParamspace) ak := auth.NewKeeper(cdc, keyAcc, authSubspace, maccPerms) nk := nodesKeeper.NewKeeper(cdc, nodesKey, ak, nodesSubspace, nodesTypes.ModuleName) - appk := appsKeeper.NewKeeper(cdc, appsKey, nk, ak, appSubspace, appsTypes.ModuleName) + appk := appsKeeper.NewKeeper(cdc, appsKey, nk, ak, nil, appSubspace, appsTypes.ModuleName) appk.SetApplication(ctx, getTestApplication()) keeper := NewKeeper(pocketKey, cdc, ak, nk, appk, &hb, pocketSubspace) + appk.PocketKeeper = keeper assert.Nil(t, err) moduleManager := module.NewManager( auth.NewAppModule(ak),