diff --git a/lib/bcoin/script.js b/lib/bcoin/script.js index efb50872..21d1b53f 100644 --- a/lib/bcoin/script.js +++ b/lib/bcoin/script.js @@ -715,26 +715,16 @@ script.execute = function execute(s, stack, tx, index) { script.multisig = function(keys, m, n) { if (keys.length < m) - throw new Error('wrong amount of pubkeys for multisig script'); + throw new Error('Wrong amount of pubkeys for multisig script'); assert(m >= 1 && m <= n); assert(n >= 1 && n <= 15); - // Format: - // op_[m] [pubkey1-len] [pubkey1] ... op_[n] op_checkmultisig - - // Using pushdata ops for m and n: - // return [ [ m ] ].concat( - // keys, - // [ [ n ], 'checkmultisig' ] - // ); - // Keys need to be in a predictable order. keys = keys.sort(function(a, b) { return new bn(a).cmp(new bn(b)) > 0; }); - // Using OP_1-16 for m and n: return [ m ].concat( keys, [ n, 'checkmultisig' ] diff --git a/lib/bcoin/tx.js b/lib/bcoin/tx.js index a12d0d6d..0e2a42e0 100644 --- a/lib/bcoin/tx.js +++ b/lib/bcoin/tx.js @@ -190,7 +190,7 @@ TX.prototype.scriptInput = function(input, pub) { return; } - throw new Error('scriptInput(): could not identify prev_out type'); + throw new Error('scriptInput(): Could not identify prev_out type'); }; // Sign the now-built scriptSigs @@ -283,7 +283,7 @@ TX.prototype.signInput = function(input, key, type) { return; } - throw new Error('signInput(): could not identify prev_out type'); + throw new Error('signInput(): Could not identify prev_out type'); }; // Build the scriptSig and sign it diff --git a/lib/bcoin/wallet.js b/lib/bcoin/wallet.js index 138783a7..77576724 100644 --- a/lib/bcoin/wallet.js +++ b/lib/bcoin/wallet.js @@ -158,7 +158,7 @@ Wallet.prototype.derive = function derive() { var options = this.options; if (!this.hd) - throw new Error('wallet is not HD'); + throw new Error('Wallet is not HD'); options.priv = this.hd.derive.apply(this.hd, arguments);