Post
Topic
Board Bitcoin Technical Support
Re: Withdrawal in HD wallet with very large gap of unused addresses
by
PrimeNumber7
on 19/05/2020, 16:42:05 UTC

In addition to increasing the gap limit you could (1) keep track of the generated addresses in a separate database and use application logic to check for incoming / outgoing transactions or (2) send small amounts of coins just within your gap limit (e.g. if your gap limit is set to 100, you could reserve every 100th address for internal purposes and send a small token amount there to bridge the gaps).

Your wallet will need to keep track of every address starting from the first address up to the last address in your gap limit after the last address that received a transaction (that your wallet is aware of). Sending dust to every 100th address will be very expensive and will not save much in other resources because the number of fewer addresses your wallet will need to monitor will decrease only by the amount of the smaller gap limit.

I would not implement this solution.