consensus change for segwit.

See https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-June/012747.html
This commit is contained in:
Christopher Jeffrey 2016-06-09 03:21:31 -07:00
parent 1984bc178c
commit 9ff5ee82e7
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

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