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

rlp: fixes for two corner cases and documentation #19527

Merged
merged 3 commits into from
May 14, 2019
Merged

Conversation

fjl
Copy link
Contributor

@fjl fjl commented May 4, 2019

These changes fix two corner cases related to internal handling of types
in package rlp:

  • The "tail" struct tag can only be applied to the last field. The check for this
    was wrong and didn't allow for private fields after the field with the tag.
  • Unsupported types (e.g. structs containing int) which implement either
    the Encoder or Decoder interface but not both couldn't be encoded/decoded.

Also fixes #19367

rlp/encode_test.go Outdated Show resolved Hide resolved
Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

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

SGTM

@karalabe karalabe added this to the 1.9.0 milestone May 14, 2019
This change improves behavior for unsupported types (e.g. structs
containing int) which implement either the Encoder or Decoder interface
but not both. Encoding and decoding wouldn't work for such types and
always returned an error.
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.

rlp: annotation need to update for the support of booleans
2 participants