-
Notifications
You must be signed in to change notification settings - Fork 766
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
Client Network Improvements #1031
Conversation
…ng instead of disconnect number)
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
da63b69
to
37e1721
Compare
@@ -208,7 +208,7 @@ export class ETH extends EventEmitter { | |||
this._latestBlock = status.latestBlock | |||
} | |||
const forkHashB = Buffer.from(this._forkHash.substr(2), 'hex') | |||
const nextForkB = Buffer.from(this._nextForkBlock.toString(16), 'hex') | |||
const nextForkB = int2buffer(this._nextForkBlock) |
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.
I don't really see how this is a fix to a bug? What is changed here?
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.
I am just a simple man and still not so fluent in Buffer
operations after all these years 😜 . The only thing I can say here is that the old code delivered an empty Buffer
, just re-tested this with Node to be sure:
> let nextForkBlock = 5
undefined
> Buffer.from(nextForkBlock.toString(16), 'hex')
<Buffer >
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! here is some explanation: nodejs/node#24491 (comment)
@alcuadrado @ryanio this is a good PR example where |
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
This PR does the following:
nextForkBlock
correctly on ETH.sendStatus() msg