net: enable segwit compact blocks.

This commit is contained in:
Christopher Jeffrey 2016-11-06 22:49:54 -08:00
parent 62ef5ea7f4
commit c3a9b7378f
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

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