Update index.js

This commit is contained in:
sairajzero 2023-02-05 17:04:21 +05:30
parent a24916243f
commit bcfe9741bd

View File

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