-
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
refactor!: make ExportGenesis return proto.Message #12700
Changes from 7 commits
2e12fa1
4c3891f
e084984
aabb540
c8498f4
2b6b679
7605079
15e4cf7
69e8b5e
4347cba
3e6692c
6d92f10
3d36566
46a83e2
735ee18
5f2a5bf
036661c
96cb0ad
12f18f9
cc81161
7475528
14d7fa6
fed6baa
c321ccd
6ac9973
60e0995
2a73e25
f031937
4e855e3
8561535
5be7220
4f5dbb7
c3fee89
56e58ae
f87781f
d304999
0181ccf
161ea0e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
package runtime | ||
|
||
import ( | ||
"encoding/json" | ||
"io" | ||
|
||
"github.com/gogo/protobuf/proto" | ||
"github.com/tendermint/tendermint/libs/log" | ||
dbm "github.com/tendermint/tm-db" | ||
|
||
|
@@ -20,8 +20,8 @@ type AppBuilder struct { | |
|
||
// DefaultGenesis returns a default genesis from the registered | ||
// AppModuleBasic's. | ||
func (a *AppBuilder) DefaultGenesis() map[string]json.RawMessage { | ||
return a.app.basicManager.DefaultGenesis(a.app.cdc) | ||
func (a *AppBuilder) DefaultGenesis() map[string]proto.Message { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will we break the AppModule interface again once we remove gogoproto? How hard would it be to use the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pulsar is not production ready from my understanding. We shouldn't force people to use it yet. the interface break is fairly small in the future, if we document then people will be fine with it |
||
return a.app.basicManager.DefaultGenesis() | ||
} | ||
|
||
// Build builds an *App instance. | ||
|
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.
It think it makes sense to have a helper for that. This logic is repeated very often.
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.
Yeah, I agree. The only difference among these is the indentation of the output. Would it make sense to have something like:
MarshalGenesisStateToJSON(gs map[string]proto.Message, cdc codec.Codec, indent bool) []byte
.Also, where would you place this helper?
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.
Yeah good question 😅
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.
Yeah, we can add such a function @facundomedica 👍