-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add BaseApp.Seal #1812
Add BaseApp.Seal #1812
Conversation
Hmm, did we discuss this somewhere (please link)? What additional safety does this provide? Modules shouldn't have access to |
2ed4a21
to
559b4c9
Compare
It was discussed in #1645. This is so that things can now use the functional initial configuration method. |
baseapp/baseapp.go
Outdated
@@ -133,25 +136,73 @@ func (app *BaseApp) MountStore(key sdk.StoreKey, typ sdk.StoreType) { | |||
} | |||
|
|||
// nolint - Set functions | |||
func (app *BaseApp) SetName(name string) { |
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.
Would it make sense to move these setters to a different file?
Codecov Report
@@ Coverage Diff @@
## develop #1812 +/- ##
===========================================
- Coverage 63.83% 63.55% -0.29%
===========================================
Files 118 119 +1
Lines 7024 7062 +38
===========================================
+ Hits 4484 4488 +4
- Misses 2285 2314 +29
- Partials 255 260 +5 |
Should we add a Not really sure on the above, since idk how much we want to optimize for developers who forget to do things. |
Thanks! Makes sense. |
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 far looks great! I have this implemented in Ethermint as well, except I have #Seal
is a private method which I call after all the options have been called. I suggest we do that here as well 👍
A lot of code is using |
I think thats a good idea @alexanderbez! That will require refactoring a lot of test cases though. Because thats a refactor we can punt until later, I think we should merge this PR without that, and then make a new issue for your idea. |
559b4c9
to
3fb3106
Compare
fix pow move setter functions apply requests
Ok, great! What is left to be done? |
How do you think about inserting |
Sounds good to me! Agreed that we should still keep the seal function as well |
fix pow move setter functions apply requests
ddddde1
to
d5a444d
Compare
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.
Looks great to me!
Can you fix the failing test? |
0b26c98
to
9d21332
Compare
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.
good work, I like the new setters.go
file - good separation
docs/
)PENDING.md
cmd/gaia
andexamples/
For Admin Use:
Closes: #1645