-
Notifications
You must be signed in to change notification settings - Fork 224
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
Generic AppState
for genesis()
#1107
Conversation
@@ -30,6 +30,5 @@ pub struct Genesis<AppState = serde_json::Value> { | |||
pub app_hash: Vec<u8>, | |||
|
|||
/// App state | |||
#[serde(default)] |
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 removed this because it would otherwise introduce a Default
bound on AppState
.
Now, did we expect the app_state
property to be missing from the response sometimes? If so, then we should revert that change.
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 think users might still be able to use an Genesis<Option<AppState>>
as a workaround in such cases. 🤔
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.
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.
LGTM 👍
@hu55a1n1 are you planning on applying this same change to master
? Let me know if you need assistance there.
Resolves: #1106
This PR basically modifies the
genesis()
RPC function like so ->(Many thanks to @romac for writing the code 🙏)
.changelog/