use this.m for nsigs.
This commit is contained in:
parent
9241a6660e
commit
3d9d6be23c
@ -42,8 +42,8 @@ function TX(data, block) {
|
|||||||
// ps = Pending Since
|
// ps = Pending Since
|
||||||
this.ps = this.ts === 0 ? +new Date() / 1000 : 0;
|
this.ps = this.ts === 0 ? +new Date() / 1000 : 0;
|
||||||
|
|
||||||
this.m = data.m || 1;
|
this.m = data.m;
|
||||||
this.n = data.n || 1;
|
this.n = data.n;
|
||||||
this.change = data.change || null;
|
this.change = data.change || null;
|
||||||
this.fee = data.fee || 10000;
|
this.fee = data.fee || 10000;
|
||||||
this.dust = 5460;
|
this.dust = 5460;
|
||||||
@ -153,6 +153,7 @@ TX.prototype.scriptInput = function(input, pub, nsigs) {
|
|||||||
// Multisig
|
// Multisig
|
||||||
// raw format: OP_FALSE [sig-1] [sig-2] ...
|
// raw format: OP_FALSE [sig-1] [sig-2] ...
|
||||||
if (bcoin.script.isMultisig(s)) {
|
if (bcoin.script.isMultisig(s)) {
|
||||||
|
nsigs = nsigs || this.m;
|
||||||
if (!nsigs)
|
if (!nsigs)
|
||||||
throw new Error('`nsigs` is required for multisig');
|
throw new Error('`nsigs` is required for multisig');
|
||||||
input.script = [ constants.opcodes['false'] ];
|
input.script = [ constants.opcodes['false'] ];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user