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
feat(x/ecocredit): basket genesis #764
feat(x/ecocredit): basket genesis #764
Changes from 13 commits
354d68f
d6bfcd6
c33dbca
c06cabf
88505e1
30d43ef
a419255
633f066
1d719fa
09fdbe6
ad851d6
33600c0
f806986
c724fac
49ca9f7
bb671c1
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.
looks like we are doing roundtrips:
Why not adding that db data to the Genesis structure (as an attribute, or an embedded field) and do only one serialization?
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.
That is true. I guess we could add a key for the legacy genesis inside the orm map before we marshal it.
But the overhead is probably not that bad. This is only for one release and then all this custom genesis stuff disappears entirely
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 would be hard to add a key for custom JSON inside the current
GenesisState
message (which is going away)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.
maybe it's worth to put some comments? I'm afraid that this can be a source of a bad practice, especially for big genesis files (or big exports).
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.
I can add a helper which does this more efficiently. This will not be the only case of hybrid modules which use orm and legacy genesis
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.
I made this more efficient. Still not perfect, but let me know if it's good enough for now.
To do anything more efficient we'd need to nest the legacy json under a key in the orm json target, but that changes the structure even more and there are more tests to change, etc.