Added setImmediate to the tests instead of the code since this seems to be where the issue is.
This commit is contained in:
parent
0ac83098e9
commit
ec720c2443
@ -93,54 +93,53 @@ describe('Daemon Binding Functionality', function() {
|
||||
// Generate enough blocks so that the initial coinbase transactions
|
||||
// can be spent.
|
||||
|
||||
client.generate(150, function(err, response) {
|
||||
setImmediate(function() {
|
||||
client.generate(150, function(err, response) {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
blockHashes = response.result;
|
||||
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
blockHashes = response.result;
|
||||
log.info('Preparing test data...');
|
||||
|
||||
log.info('Preparing test data...');
|
||||
// Get all of the unspent outputs
|
||||
client.listUnspent(0, 150, function(err, response) {
|
||||
utxos = response.result;
|
||||
|
||||
// Get all of the unspent outputs
|
||||
client.listUnspent(0, 150, function(err, response) {
|
||||
utxos = response.result;
|
||||
|
||||
async.mapSeries(utxos, function(utxo, next) {
|
||||
async.series([
|
||||
function(finished) {
|
||||
// Load all of the transactions for later testing
|
||||
client.getTransaction(utxo.txid, function(err, txresponse) {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
// add to the list of transactions for testing later
|
||||
transactionData.push(txresponse.result.hex);
|
||||
finished();
|
||||
});
|
||||
},
|
||||
function(finished) {
|
||||
// Get the private key for each utxo
|
||||
client.dumpPrivKey(utxo.address, function(err, privresponse) {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
utxo.privateKeyWIF = privresponse.result;
|
||||
finished();
|
||||
});
|
||||
async.mapSeries(utxos, function(utxo, next) {
|
||||
async.series([
|
||||
function(finished) {
|
||||
// Load all of the transactions for later testing
|
||||
client.getTransaction(utxo.txid, function(err, txresponse) {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
// add to the list of transactions for testing later
|
||||
transactionData.push(txresponse.result.hex);
|
||||
finished();
|
||||
});
|
||||
},
|
||||
function(finished) {
|
||||
// Get the private key for each utxo
|
||||
client.dumpPrivKey(utxo.address, function(err, privresponse) {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
utxo.privateKeyWIF = privresponse.result;
|
||||
finished();
|
||||
});
|
||||
}
|
||||
], next);
|
||||
}, function(err) {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
], next);
|
||||
}, function(err) {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
done();
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user