Browse Source

tests/integration: throw verbose error if unspent is missing

addLowRGrinding
Daniel Cousens 7 years ago
parent
commit
31ab9bfc03
  1. 5
      test/integration/_regtest.js

5
test/integration/_regtest.js

@ -38,7 +38,10 @@ function faucet (address, value, callback) {
unspents(address, function (err, results) {
if (err) return callback(err)
callback(null, results.filter(x => x.txId === txId).pop())
const unspents = results.filter(x => x.txId === txId)
if (unspents.length === 0) return callback(new Error('Missing unspent'))
callback(null, unspents.pop())
})
})
}

Loading…
Cancel
Save