Conversation
07068f4 to
5b2f60b
Compare
h5law
left a comment
There was a problem hiding this comment.
Nice, straight port of the previous one so lets merge it in to main!
| option(m) | ||
| } | ||
|
|
||
| m.SetBus(bus) |
There was a problem hiding this comment.
Should this be registerModule or just setBus?
There was a problem hiding this comment.
@Olshansk I'll find out more about this tomorrow with @bryanchriswhite because I need more context from him to properly answer that.
There was a problem hiding this comment.
I'll rephrase, it should be RegisterModule IMO.
func (m *bus) RegisterModule(module modules.Module) {
module.SetBus(m)
m.modulesRegistry.RegisterModule(module)
}
SetBus: Get access to DI
RegisterModule: Get access to DI and make this module accessible via DI (e.g. IBC module getting access to trees module)
There was a problem hiding this comment.
Get access to DI and make this module accessible via DI (e.g. IBC module getting access to trees module)
Yeah I added the GetTreeStore method back to persistence module but ideally now its a sub module we want to access it straight from the bus
Description
Loads the TreeStore from a proper module and allows it access to the bus.
Issue
Refactor related to #756
This PR is the sum of feedback from #808.
Type of change
Please mark the relevant option(s):
List of changes
Testing
make develop_test; if any code changes were mademake test_e2eon k8s LocalNet; if any code changes were madee2e-devnet-testpasses tests on DevNet; if any code was changedRequired Checklist
godocformat comments on touched members (see: tip.golang.org/doc/comment)If Applicable Checklist
shared/docs/*if I updatedshared/*README(s)