From 006c798faf4960e928c58a4889b982ad51d17ba6 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Fri, 7 Aug 2015 20:39:58 +1000 Subject: [PATCH] integration: pass network through to TxBuilder --- test/integration/advanced.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/integration/advanced.js b/test/integration/advanced.js index 23629a7..d919b74 100644 --- a/test/integration/advanced.js +++ b/test/integration/advanced.js @@ -26,9 +26,8 @@ describe('bitcoinjs-lib (advanced)', function () { it('can create an OP_RETURN transaction', function (done) { this.timeout(20000) - var keyPair = bitcoin.ECPair.makeRandom({ - network: bitcoin.networks.testnet - }) + var network = bitcoin.networks.testnet + var keyPair = bitcoin.ECPair.makeRandom({ network: network }) var address = keyPair.getAddress() faucetWithdraw(address, 2e4, function (err) { @@ -37,7 +36,7 @@ describe('bitcoinjs-lib (advanced)', function () { pollUnspent(blockchain, address, function (err, unspents) { if (err) return done(err) - var tx = new bitcoin.TransactionBuilder() + var tx = new bitcoin.TransactionBuilder(network) var data = new Buffer('bitcoinjs-lib') var dataScript = bitcoin.scripts.nullDataOutput(data)