-
Notifications
You must be signed in to change notification settings - Fork 248
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
Fix compact event field decoding #384
Conversation
Thanks for this @ascjones. Not particular related to the fix of this PR, but it seems that the latest updates of Are you able to run this When setting |
please open an issue in
Thus, meanwhile use |
62c0338
to
10c3d51
Compare
meta_type, | ||
TypeInfo, | ||
}; | ||
use std::convert::TryFrom; |
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.
we are on edition 2021
right?
use std::convert::TryFrom; |
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.
Yes we are, sorry I missed this comment before merging 😬
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, neat
@@ -166,7 +166,7 @@ impl codec::Encode for Encoded { | |||
} | |||
|
|||
/// A phase of a block's execution. | |||
#[derive(Clone, Debug, Eq, PartialEq, Decode)] | |||
#[derive(Clone, Debug, Eq, PartialEq, Decode, Encode)] |
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.
was this required compact encoding/decoding
to work or a bonus? :)
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.
Just for the tests in order to encode some EventRecord
s
* Add basic event decoding test * Failing compact event field test * Fmt * Fix compact event field decoding * Remove println * Add test for compact wrapper struct * Revert "Add test for compact wrapper struct" This reverts commit 4e8332d. * Split compact tests and add multiple events test
Events with compact fields were failing to be decoded. Adds unit tests for event decoding.
Fixes #383 (comment)