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

pkg/scale: add support for maps #2828

Closed
qdm12 opened this issue Sep 13, 2022 · 1 comment
Closed

pkg/scale: add support for maps #2828

qdm12 opened this issue Sep 13, 2022 · 1 comment

Comments

@qdm12
Copy link
Contributor

qdm12 commented Sep 13, 2022

As defined: https://spec.polkadot.network/#defn-scale-dictionary

We have a (bad but easily fixed) implementation in func (d *InherentsData) Encode() ([]byte, error) right now, and this one should be moved in the scale codec.

It has to be fixed to encode the key and value as tuples instead of writing them directly and pushing the encoding responsibility to the caller.

The function func (d *InherentsData) Encode() can then be removed and replaced with the scale package Marshal function

@qdm12
Copy link
Contributor Author

qdm12 commented Sep 13, 2022

Duplicate of #2796

@qdm12 qdm12 marked this as a duplicate of #2796 Sep 13, 2022
@qdm12 qdm12 closed this as completed Sep 13, 2022
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

No branches or pull requests

1 participant