tests: avoid too-long-mempool-chain errors

This commit is contained in:
Daniel Cousens 2017-04-18 14:03:09 +10:00 committed by Daniel Cousens
parent 4d6928a68b
commit 170328341b

View file

@ -13,6 +13,11 @@ var keyPair = bitcoin.ECPair.fromWIF('cQqjeq2rxqwnqwMewJhkNtJDixtX8ctA4bYoWHdxY4
var kpAddress = keyPair.getAddress()
function fundAddress (unspents, outputs, callback) {
// avoid too-long-mempool-chain
unspents = unspents.filter(function (x) {
return x.confirmations > 0
})
var result = coinSelect(unspents, outputs, 10)
if (!result.inputs) return callback(new Error('Faucet empty'))