-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Introduce StatusEth69 for eth/69
status messages
#14292
Conversation
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.
okay, looks like supporting both in one struct isn't super ideal -.- sorry about this
can we start by introducing a new struct StatusEth69
that is the same as status but doesn't have the totaldifficulty?
204a725
to
9052b5d
Compare
eth/69
status messages
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.
this is a lot better
a few more suggestions
like to just inctroduce the StatusEth69 struct by itself,
yep
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
ty this should unblock us from adding eth69 support real quick once it's finalized
(potentially) Closes #12194
Continued with the option approach, but implemented a customPartialEq
in which:If version is eth69, ignore the total_difficulty fieldIf version is eth66_68, treat atotal_difficulty=None
andtotal_difficulty=0
as equal, avoiding this comparison issue: (Support upcoming Eth69 Status message #12194 (comment))Introducing
StatusEth69
struct foreth/69
status messages, in which thetotal_difficulty
field was dropped.