Closed dylanlott closed 1 year ago
@dylanlott Could you also add a function to the
bus
like soGetTreeStore()
inshared/modules/bus_module.go
andruntime/bus.go
so the module can be retirved from the registry?
Done 👍
Also not sure if the treestore module has it but just incase the module registry requires the
GetModuleName()
function in order to register the module
It existed, it was just in trees/trees.go
. I moved it to trees/module.go
though because it's better there.
LFG!
Left a comment you need to use the treestore module name and type in the bus get function but besides that its 💶
So, I was going to bring that up: We can't use the name of the tree store submodule, we have to access it through the persistence module's getter because it's a Submodule. Okay I see the problem now. Investigating a better solution now.
Superseded by #861
Description
tl;dr- a one-liner that registers the TreeStore submodule to the bus.
This was enabled by a change made in #855 after the TreeStore was modularized that creates a concrete Submodule implementation and allows them to be passed to the bus registration function like full modules. This PR updates the TreeStore to take full advantage of that submodule interface change and expose it on the bus for use in external modules, e.g. the IBC module.
Issue
References a discussion abodut submodules and bus registration brought up during #808 Updates the TreeStore submodule to register itself on the bus as a submodule which was enabled by #855
Type of change
Please mark the relevant option(s):
List of changes
Testing
make develop_test
; if any code changes were mademake test_e2e
on k8s LocalNet; if any code changes were madee2e-devnet-test
passes tests on DevNet; if any code was changedRequired Checklist
godoc
format comments on touched members (see: tip.golang.org/doc/comment)If Applicable Checklist
shared/docs/*
if I updatedshared/*
README(s)