fix: write handshake nonce correctly#129
Conversation
The `value` and `offset` args to `Buffer.writeUInt32LE` vs `DataView.setUint32` are the other way round. Fixes a bug introduced in ChainSafe#125 where we were using the nonce value as an offset and writing `4` rather than writing the nonce value at offset `4`.
Codecov Report
@@ Coverage Diff @@
## master #129 +/- ##
=======================================
Coverage 88.59% 88.59%
=======================================
Files 16 16
Lines 1841 1841
Branches 248 248
=======================================
Hits 1631 1631
Misses 210 210
Continue to review full report at Codecov.
|
|
I have no idea how you manage to pinpoint this but good job 👏🏻 👏🏻 👏🏻 👏🏻 |
|
@wemeetagain mind shipping a patch release with this? It seems we need it to fix CI: https://app.circleci.com/pipelines/github/ipfs/go-ipfs/6010/workflows/3f9c17d0-e388-43f8-8dee-0a7789c5928f/jobs/65407 |
Released 5.0.2 |
The
valueandoffsetargs toBuffer.writeUInt32LEvsDataView.setUint32are the other way round.Fixes a bug introduced in #125 where we were using the nonce value as an offset and writing
4rather than writing the nonce value at offset4.