mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
reconfigure rescan logic to raise maxNumberOfIndexesToCheck as needed
so if we have activity beyond index 1000, maxNumberOfIndexesToCheck effectively increases
This commit is contained in:
parent
5720f08aad
commit
93a0f1f6ab
1 changed files with 7 additions and 1 deletions
|
@ -472,8 +472,14 @@ class BitcoinCashWallet extends CoinServiceAPI
|
|||
int gapCounter = 0;
|
||||
int highestIndexWithHistory = 0;
|
||||
|
||||
// Loop until either the index limit or the highest index with history,
|
||||
// whichever is greater, plus the gap limit, so that we if there is activity
|
||||
// above the max index, the limit is raised to that index plus the gap limit.
|
||||
for (int index = 0;
|
||||
index < maxNumberOfIndexesToCheck && gapCounter < maxUnusedAddressGap;
|
||||
index <
|
||||
max(maxNumberOfIndexesToCheck,
|
||||
highestIndexWithHistory + maxUnusedAddressGap) &&
|
||||
gapCounter < maxUnusedAddressGap;
|
||||
index += txCountBatchSize) {
|
||||
List<String> iterationsAddressArray = [];
|
||||
Logging.instance.log(
|
||||
|
|
Loading…
Reference in a new issue