integration tests: fix 2-of-2 spend address network
This commit is contained in:
parent
d9c716cc29
commit
67e97f70d4
2 changed files with 2 additions and 5 deletions
test/integration
|
@ -1,5 +1,4 @@
|
||||||
var assert = require('assert')
|
var assert = require('assert')
|
||||||
|
|
||||||
var bigi = require('bigi')
|
var bigi = require('bigi')
|
||||||
var bitcoin = require('../../')
|
var bitcoin = require('../../')
|
||||||
var crypto = require('crypto')
|
var crypto = require('crypto')
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
var assert = require('assert')
|
var assert = require('assert')
|
||||||
|
|
||||||
var bitcoin = require('../../')
|
var bitcoin = require('../../')
|
||||||
|
|
||||||
var helloblock = require('helloblock-js')({
|
var helloblock = require('helloblock-js')({
|
||||||
network: 'testnet'
|
network: 'testnet'
|
||||||
})
|
})
|
||||||
|
@ -30,14 +28,14 @@ describe('bitcoinjs-lib (multisig)', function() {
|
||||||
|
|
||||||
var redeemScript = bitcoin.scripts.multisigOutput(2, pubKeys) // 2 of 2
|
var redeemScript = bitcoin.scripts.multisigOutput(2, pubKeys) // 2 of 2
|
||||||
var scriptPubKey = bitcoin.scripts.scriptHashOutput(redeemScript.getHash())
|
var scriptPubKey = bitcoin.scripts.scriptHashOutput(redeemScript.getHash())
|
||||||
var address = bitcoin.Address.fromOutputScript(scriptPubKey).toString()
|
var address = bitcoin.Address.fromOutputScript(scriptPubKey, bitcoin.networks.testnet).toString()
|
||||||
|
|
||||||
// Attempt to send funds to the source address
|
// Attempt to send funds to the source address
|
||||||
helloblock.faucet.withdraw(address, 2e4, function(err) {
|
helloblock.faucet.withdraw(address, 2e4, function(err) {
|
||||||
if (err) return done(err)
|
if (err) return done(err)
|
||||||
|
|
||||||
// get latest unspents from the address
|
// get latest unspents from the address
|
||||||
helloblock.addresses.getUnspents(address, function(err, res, unspents) {
|
helloblock.addresses.getUnspents(address, function(err, _, unspents) {
|
||||||
if (err) return done(err)
|
if (err) return done(err)
|
||||||
|
|
||||||
// filter small unspents
|
// filter small unspents
|
||||||
|
|
Loading…
Add table
Reference in a new issue