-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Description
After #24779 InvokeSetHooks
is now called with a nil keeper
debugging with dlv
:
> [Breakpoint 1] github.com/cosmos/cosmos-sdk/x/epochs.InvokeSetHooks() /home/ammarelsabe/go/pkg/mod/github.com/cosmos/[email protected]/x/epochs/depinject.go:52 (hits goroutine(1):1 total:1) (PC: 0x4f31f16)
47: k := keeper.NewKeeper(in.StoreService, in.Cdc)
48: m := NewAppModule(k)
49: return ModuleOutputs{EpochKeeper: k, Module: m}
50: }
51:
=> 52: func InvokeSetHooks(keeper *keeper.Keeper, hooks map[string]types.EpochHooksWrapper) error {
53: if keeper == nil || hooks == nil {
54: return nil
55: }
56:
57: // Default ordering is lexical by module name.
(dlv) print hooks
map[string]github.com/cosmos/cosmos-sdk/x/epochs/types.EpochHooksWrapper [
"presale": {
EpochHooks: github.com/cosmos/cosmos-sdk/x/epochs/types.EpochHooks(github.com/rivtechnologies/rivchain/x/presale/keeper.PresaleEpochHooks) *(*"github.com/cosmos/cosmos-sdk/x/epochs/types.EpochHooks")(0xc001222fd8),},
]
(dlv) print keeper
*github.com/cosmos/cosmos-sdk/x/epochs/keeper.Keeper nil
this may be because the ModuleOutputs
specifies a value keeper.Keeper
instead of a pointer as pointed out by @chenfux in #24768, I also haven't been able to get the hooks to work when using DI at all, even when calling App.EpochsKeeper.SetHooks
manually
Metadata
Metadata
Assignees
Labels
No labels