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; }