integration: pass network through to TxBuilder

This commit is contained in:
Daniel Cousens 2015-08-07 20:39:58 +10:00
parent 1eb98be6a5
commit 006c798faf

View file

@ -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)