Skip to content
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 option decoding and add basic sanity test #161

Merged
merged 1 commit into from
Sep 15, 2020

Conversation

gregdhill
Copy link
Contributor

@gregdhill gregdhill commented Sep 11, 2020

Signed-off-by: Gregory Hill gregorydhill@outlook.com

The previous fix was not complete, we need to update the output bytes to indicate whether the Option is Some or None. I've also added a small test to validate this against the codec library.

src/metadata.rs Outdated
modules_with_calls: HashMap<String, ModuleWithCalls>,
modules_with_events: HashMap<String, ModuleWithEvents>,
modules_with_errors: HashMap<String, ModuleWithErrors>,
pub(crate) modules: HashMap<String, ModuleMetadata>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer to add a constructor rather than making all these pub(crate). Could probably just derive Default for your use case in the test.

Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
Copy link
Contributor

@ascjones ascjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ascjones ascjones merged commit 2829d7d into paritytech:master Sep 15, 2020
@gregdhill gregdhill deleted the fix-option-decoding branch September 15, 2020 08:35
@dvdplm dvdplm mentioned this pull request Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants