-
Notifications
You must be signed in to change notification settings - Fork 20.6k
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
eth/protocols/eth: remove magic numbers in tests #21999
eth/protocols/eth: remove magic numbers in tests #21999
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.
LGTM, even fixes a small bug in l.334
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, thanks!
eth/handler_test.go
Outdated
if msg.Code != 0x0e { | ||
t.Fatalf("response packet code mismatch: have %x, want %x", msg.Code, 0x0c) | ||
if msg.Code != NodeDataMsg { | ||
t.Fatalf("response packet code mismatch: have %x, want %x", msg.Code, NodeDataMsg) |
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.
Ha, this was wrong before, good catch there!
Let's hold this PR though, and rebase+apply it after #21482 is merged |
@holiman , no problem ! I am not in hurry :) |
ae75e7e
to
f3da993
Compare
Rebased |
Thanks! |
Have removed magic numbers, have replaced it with the variables usage from the protocol.go