diff --git a/lib/bcoin/tx.js b/lib/bcoin/tx.js index a1523c80..2d77ca7e 100644 --- a/lib/bcoin/tx.js +++ b/lib/bcoin/tx.js @@ -42,8 +42,8 @@ function TX(data, block) { // ps = Pending Since this.ps = this.ts === 0 ? +new Date() / 1000 : 0; - this.m = data.m || 1; - this.n = data.n || 1; + this.m = data.m; + this.n = data.n; this.change = data.change || null; this.fee = data.fee || 10000; this.dust = 5460; @@ -153,6 +153,7 @@ TX.prototype.scriptInput = function(input, pub, nsigs) { // Multisig // raw format: OP_FALSE [sig-1] [sig-2] ... if (bcoin.script.isMultisig(s)) { + nsigs = nsigs || this.m; if (!nsigs) throw new Error('`nsigs` is required for multisig'); input.script = [ constants.opcodes['false'] ];