From f64df795558f42d7ac4d8ffb2701f35381e2d663 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Thu, 21 May 2015 00:46:36 +1000 Subject: [PATCH] *: adhere to standard 3 --- src/scripts.js | 3 ++- test/bitcoin.core.js | 3 ++- test/integration/crypto.js | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/scripts.js b/src/scripts.js index fde409f..c9e4978 100644 --- a/src/scripts.js +++ b/src/scripts.js @@ -14,8 +14,9 @@ function isCanonicalPubKey (buffer) { try { ecurve.Point.decodeFrom(curve, buffer) } catch (e) { - if (!(e.message.match(/Invalid sequence (length|tag)/))) + if (!(e.message.match(/Invalid sequence (length|tag)/))) { throw e + } return false } diff --git a/test/bitcoin.core.js b/test/bitcoin.core.js index ea9eebf..6511368 100644 --- a/test/bitcoin.core.js +++ b/test/bitcoin.core.js @@ -60,8 +60,9 @@ describe('Bitcoin-core', function () { var network = networks.bitcoin if (params.isPrivkey) return - if (params.isTestnet) + if (params.isTestnet) { network = networks.testnet + } it('can import ' + string, function () { var address = Address.fromBase58Check(string) diff --git a/test/integration/crypto.js b/test/integration/crypto.js index a5f105f..60e2cea 100644 --- a/test/integration/crypto.js +++ b/test/integration/crypto.js @@ -150,8 +150,7 @@ describe('bitcoinjs-lib (crypto)', function () { // finally, run the tasks, then on to the math async.parallel(tasks, function (err) { - if (err) - throw err + if (err) throw err var n = bitcoin.ECPair.curve.n