diff --git a/lib/services/address/index.js b/lib/services/address/index.js index 2c772101..2da241e4 100644 --- a/lib/services/address/index.js +++ b/lib/services/address/index.js @@ -216,7 +216,7 @@ AddressService.prototype.getAddressHistory = function(addresses, options, stream }, function(err) { - console.debug('getAddressHistory-end', err, results.totalCount, results.items.length); + console.debug('getAddressHistory-END', err, results.totalCount, results.items.length); if (err) { return callback(err); @@ -318,7 +318,7 @@ AddressService.prototype.getAddressSummary = function(address, options, streamer }, function(err) { - console.debug('getAddressSummary', err, result); + console.debug('getAddressSummary-END', err, result); if (err) { return callback(err); } @@ -732,15 +732,17 @@ AddressService.prototype._streamAddressSummary = function(address, options, stre }); } - + console.debug("Q-PROCESS", id.txid); self._transaction.getDetailedTransaction(id.txid, options, cb); }, 4); q.pause(); //pause and wait until queue is set + q.empty(() => console.debug("Q-EMPTY")); + function process_chunk(err, tx){ - console.debug("PROCESS_CHUNK:", tx.txid()); + console.debug("PROCESS_CHUNK:", [...q].length, tx.txid()); streamer(err, tx); if(err){ @@ -790,6 +792,7 @@ AddressService.prototype._streamAddressSummary = function(address, options, stre }); txIdTransformStream.on('end', function() { + console.debug("TRANSFORM-END"); q.resume(); }); @@ -804,7 +807,7 @@ AddressService.prototype._streamAddressSummary = function(address, options, stre txidStream.pipe(txIdTransformStream); q.drain(function (e, d){ - console.debug("Drain reached...", e, d); + console.debug("Q-DRAIN", e, d); next(e, d); });