tests: avoid too-long-mempool-chain errors
This commit is contained in:
parent
4d6928a68b
commit
170328341b
1 changed files with 5 additions and 0 deletions
|
@ -13,6 +13,11 @@ var keyPair = bitcoin.ECPair.fromWIF('cQqjeq2rxqwnqwMewJhkNtJDixtX8ctA4bYoWHdxY4
|
||||||
var kpAddress = keyPair.getAddress()
|
var kpAddress = keyPair.getAddress()
|
||||||
|
|
||||||
function fundAddress (unspents, outputs, callback) {
|
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)
|
var result = coinSelect(unspents, outputs, 10)
|
||||||
if (!result.inputs) return callback(new Error('Faucet empty'))
|
if (!result.inputs) return callback(new Error('Faucet empty'))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue