From efd260830ebe59fd675fbff69d3d7d39a1c98c72 Mon Sep 17 00:00:00 2001 From: Antonio Barcelos Date: Tue, 8 Dec 2020 13:34:26 +0100 Subject: [PATCH] Use the extended handshake to enable protocol 4.2 --- src/internal/protocol-handshaker.js | 2 +- test/internal/connection-channel.test.js | 2 +- test/internal/protocol-handshaker.test.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/internal/protocol-handshaker.js b/src/internal/protocol-handshaker.js index 56a025186..3d6f5e1a8 100644 --- a/src/internal/protocol-handshaker.js +++ b/src/internal/protocol-handshaker.js @@ -156,7 +156,7 @@ function newHandshakeBuffer () { handshakeBuffer.writeInt32(BOLT_MAGIC_PREAMBLE) // proposed versions - handshakeBuffer.writeInt32((3 << 8) | 4) + handshakeBuffer.writeInt32((1 << 16) | (3 << 8) | 4) handshakeBuffer.writeInt32((1 << 8) | 4) handshakeBuffer.writeInt32(4) handshakeBuffer.writeInt32(3) diff --git a/test/internal/connection-channel.test.js b/test/internal/connection-channel.test.js index 630c63c62..cf5f8957b 100644 --- a/test/internal/connection-channel.test.js +++ b/test/internal/connection-channel.test.js @@ -123,7 +123,7 @@ describe('#integration ChannelConnection', () => { connection._negotiateProtocol() const boltMagicPreamble = '60 60 b0 17' - const protocolVersion4x3 = '00 00 03 04' + const protocolVersion4x3 = '00 01 03 04' const protocolVersion4x1 = '00 00 01 04' const protocolVersion4x0 = '00 00 00 04' const protocolVersion3 = '00 00 00 03' diff --git a/test/internal/protocol-handshaker.test.js b/test/internal/protocol-handshaker.test.js index de2ca21dc..2d6e0f99c 100644 --- a/test/internal/protocol-handshaker.test.js +++ b/test/internal/protocol-handshaker.test.js @@ -44,7 +44,7 @@ describe('#unit ProtocolHandshaker', () => { expect(writtenBuffers.length).toEqual(1) const boltMagicPreamble = '60 60 b0 17' - const protocolVersion4x3 = '00 00 03 04' + const protocolVersion4x3 = '00 01 03 04' const protocolVersion4x1 = '00 00 01 04' const protocolVersion4x0 = '00 00 00 04' const protocolVersion3 = '00 00 00 03'