peer: only request cmpctblock if we received sendcmpct.

This commit is contained in:
Christopher Jeffrey 2017-01-29 16:26:36 -08:00
parent fae56d1387
commit cc6ccfe9d9
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -1407,8 +1407,10 @@ Peer.prototype.blockType = function blockType() {
return invTypes.FILTERED_BLOCK;
if (this.options.compact) {
if (this.hasCompact())
return invTypes.CMPCT_BLOCK;
if (this.hasCompact() && this.compactMode !== -1) {
if (!this.options.hasWitness() || this.compactWitness)
return invTypes.CMPCT_BLOCK;
}
}
if (this.hasWitness())