Tests to arrow functions, use strict asserts, travis uses docker instead of regtest server

This commit is contained in:
junderw 2019-04-09 15:09:50 +09:00
parent 16823e9013
commit dc1ef5958b
No known key found for this signature in database
GPG key ID: B256185D3A971908
24 changed files with 505 additions and 498 deletions
test/integration

View file

@ -47,7 +47,7 @@ async function faucet (address, value) {
let _unspents = []
const sleep = ms => new Promise((resolve, reject) => setTimeout(resolve, ms))
const randInt = (min, max) => min + Math.floor((max - min + 1) * Math.random())
do {
while (_unspents.length === 0) {
if (count > 0) {
if (count >= 5) throw new Error('Missing Inputs')
console.log('Missing Inputs, retry #' + count)
@ -78,7 +78,7 @@ async function faucet (address, value) {
_unspents = results.filter(x => x.txId === txId)
count++
} while (_unspents.length === 0)
}
return _unspents.pop()
}