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