From bcfe9741bda06a3d6a47e4e2e9584f1554cb7de9 Mon Sep 17 00:00:00 2001 From: sairajzero Date: Sun, 5 Feb 2023 17:04:21 +0530 Subject: [PATCH] Update index.js --- lib/services/address/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/services/address/index.js b/lib/services/address/index.js index 8c01348b..ee657f91 100644 --- a/lib/services/address/index.js +++ b/lib/services/address/index.js @@ -210,6 +210,9 @@ AddressService.prototype.getAddressHistory = function(addresses, options, stream if(results.items.length < MAX_TX_QUERY_LIMIT && !results.items.some(x => x.txid() === tx.txid())) //push only if tx not already in array results.items.unshift(tx); //using unshift, so that recent tx (low) are at front + + if(results.items.length >= MAX_TX_QUERY_LIMIT) //indicate max array limit is reached, the sub process can stop + options.flag_stop = true; }