make witness scripts abide by max_element_size again.
This commit is contained in:
parent
f5b4bb2bf6
commit
98774d0c0b
@ -162,13 +162,8 @@ Address.prototype.getScript = function getScript() {
|
||||
|
||||
redeem = bcoin.script.createMultisig(this.keys, this.m, this.n);
|
||||
|
||||
if (this.witness) {
|
||||
if (redeem.getSize() > 10000)
|
||||
throw new Error('Redeem script too large (10000 byte limit).');
|
||||
} else {
|
||||
if (redeem.getSize() > 520)
|
||||
throw new Error('Redeem script too large (520 byte limit).');
|
||||
}
|
||||
if (redeem.getSize() > 520)
|
||||
throw new Error('Redeem script too large (520 byte limit).');
|
||||
|
||||
this._script = redeem;
|
||||
}
|
||||
@ -195,9 +190,6 @@ Address.prototype.getProgram = function getProgram() {
|
||||
hash = Address.sha256(this.getScript().encode());
|
||||
program = bcoin.script.createWitnessProgram(0, hash);
|
||||
}
|
||||
|
||||
assert(program);
|
||||
|
||||
this._program = program;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user