From 9ff5ee82e7f8943e21f0a134268b98198b3c47a2 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 9 Jun 2016 03:21:31 -0700 Subject: [PATCH] consensus change for segwit. See https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-June/012747.html --- lib/bcoin/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bcoin/script.js b/lib/bcoin/script.js index 382c56c7..73ffdaf7 100644 --- a/lib/bcoin/script.js +++ b/lib/bcoin/script.js @@ -2599,7 +2599,7 @@ Script.prototype.getCommitmentHash = function getCommitmentHash() { Script.prototype.isWitnessProgram = function isWitnessProgram() { // Witness programs are strict minimaldata. if (this.raw) { - if (!(this.raw.length >= 4 && this.raw.length <= 34)) + if (!(this.raw.length >= 4 && this.raw.length <= 42)) return false; if (this.raw[0] !== opcodes.OP_0 @@ -2624,7 +2624,7 @@ Script.prototype.isWitnessProgram = function isWitnessProgram() { return (this.code[0] === opcodes.OP_0 || (this.code[0] >= opcodes.OP_1 && this.code[0] <= opcodes.OP_16)) - && this.code[1].length >= 2 && this.code[1].length <= 32; + && this.code[1].length >= 2 && this.code[1].length <= 40; }; /**