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)); }; /**