From c3a9b7378fa3d2b6210f08d0d57e93daa59eed5a Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sun, 6 Nov 2016 22:49:54 -0800 Subject: [PATCH] net: enable segwit compact blocks. --- lib/net/peer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/net/peer.js b/lib/net/peer.js index ec5da013..ac18d181 100644 --- a/lib/net/peer.js +++ b/lib/net/peer.js @@ -2378,8 +2378,9 @@ Peer.prototype.sendReject = function sendReject(code, reason, obj) { */ Peer.prototype.sendCompact = function sendCompact() { + var version = this.options.witness ? 2 : 1; this.logger.info('Initializing compact blocks (%s).', this.hostname); - return this.send(new packets.SendCmpctPacket(0, 1)); + return this.send(new packets.SendCmpctPacket(0, version)); }; /**