From cb89be8263870b6af76e60303c86c49ce2de6da4 Mon Sep 17 00:00:00 2001 From: sairajzero Date: Sun, 5 Feb 2023 19:09:49 +0530 Subject: [PATCH] logging --- lib/services/address/index.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/services/address/index.js b/lib/services/address/index.js index 1ec8b327..a618a367 100644 --- a/lib/services/address/index.js +++ b/lib/services/address/index.js @@ -881,14 +881,10 @@ AddressService.prototype._streamAddressSummary = function(address, options, stre }, 4); - let emp_count = 0, d_count = 0; - q.empty = () => console.debug("EMPTY", ++emp_count, td_count); - q.drain = () => console.debug("DRAIN", ++d_count, td_count); - //q.pause(); //pause and wait until queue is set function chunkCallback(err, tx){ - console.debug("CHUNK", td_count, q.length(), q.killed); + if(q.killed || (!err && !tx)) //no error or tx data (duplicate calls will have empty tx value) return; @@ -925,7 +921,9 @@ AddressService.prototype._streamAddressSummary = function(address, options, stre self._transaction.getTransaction(options.after, options, function(err, tx) { - if(tx && tx.confirmations && tx.height > options.start) { + if(!tx) console.debug(options.after + "Not found"); + + if(tx && tx.confirmations && tx.height >= options.start) { options.start = tx.height;