Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: allow the mock module to be used multiple times as base ibc application in middleware stack #892
refactor: allow the mock module to be used multiple times as base ibc application in middleware stack #892
Changes from all commits
70e6a3a
ba3d43d
174057e
a78bc3f
aeb3d61
f330f34
0b3d732
5c38780
662b5e7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is so that one
AppModule
can be shared between multipleMockIBCApps
?I find it slightly confusing how
IBCModule
contains a reference to itsMockIBCApp
but also a reference toAppModule
which contains references to all otherMockIBCApps
.Is there a way it could be structured so that you could call
NewAppModule
per mock application? I guess different args would need to be supplied if that was done and maybe complicate things further. Perhaps I'm overthinking things a bit, I'm just thinking out loud here really for what may be the easiest to follow option.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No this was the purpose of splitting out the IBC callbacks. SDK doesn't allow you to register the same AppModule twice. The alternative approaches:
NewAppModule
I felt the dev UX improvements were worth the under the hood magic (hence why those variables are private). I'm happy to change the API if we feel it is better for the ibc apps to be passed in at
NewAppModule
instantiationThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, that slipped my mind from before! Got a little lost in the weeds thinking of alternatives. Makes sense along with the context from your other comment too, thanks a lot for the thorough explanation! I agree, since this is kind of hidden away anyway, its totally worth it for the testability of middleware..etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some apps like ica auth modules don't bind/claim ports