tests: add a timeout to let the backend keep up

This commit is contained in:
Daniel Cousens 2017-04-18 13:43:26 +10:00 committed by Daniel Cousens
parent f3d0dddc5a
commit c852372559

View file

@ -33,9 +33,14 @@ function fundAddress (unspents, outputs, callback) {
var txId = tx.getId()
testnet.transactions.propagate(tx.toHex(), function (err) {
callback(err, outputs.map(function (x, i) {
return { txId: txId, vout: i }
}))
if (err) return callback(err)
// FIXME: @blocktrail can be very slow, give it time
setTimeout(() => {
callback(null, outputs.map(function (x, i) {
return { txId: txId, vout: i }
}))
}, 3000)
})
}