diff --git a/lib/services/address/index.js b/lib/services/address/index.js index 5c8e83e6..ab1907de 100644 --- a/lib/services/address/index.js +++ b/lib/services/address/index.js @@ -777,7 +777,7 @@ AddressService.prototype._streamAddressSummary = function(address, options, stre next(); }, // stream the rest of the confirmed txids out of the address index - function(next) { + async function(next) { var txIdTransformStream = new Transform({ objectMode: true }); @@ -806,11 +806,9 @@ AddressService.prototype._streamAddressSummary = function(address, options, stre var txidStream = self._getTxidStream(address, options); txidStream.pipe(txIdTransformStream); - q.drain(function (e, d){ - console.debug("Q-DRAIN", e, d); - next(e, d); - }); - + await q.drain(); + console.debug("Q-DRAIN"); + next(); } ], callback);