<p>No, that's not how it works. Blockchain (and most other HD wallets by default, as set in BIP 44) look forward 20 addresses before deciding that no more are being used, it doesn't ignore the ones before that. Its purely a way of telling which ones you're using, because you can generate effectively as many as you want using incremental indices, and you wallet shouldnt have to check them <em>all</em> every time you update your balance. So it checks index 1, then 2, and so on, until it finds a stretch of 20 unused addresses in a row before assuming it's reached the end of the addresses you are using currently. If at some point in the future, you received a payment on one of those 20 in the gap, the wallet would begin looking 20 indices higher from that one. </p>

<p>So the only way you could miss payments is if they were too far in the <em>higher</em> indices not lower, e.g. no payments on indices above 10 but one on 30 would go unseen, because the wallet would give up looking after 20 unused. That's why blockchain usually warns you if you're approaching the gap limit rather than silently letting you.</p>

CC BY-SA 4.0
2019-06-03T02:06:55.223Z
what happen if we reach the gap limit? is always something that we can fix just increasing that number in our wallet or we could loose the funds forever in some cases? my question here: https://bitcoin.stackexchange.com/questions/88128/gap-limit-is-always-a-problem-possible-to-fix
Enrique
CC BY-SA 3.0
2017-08-21T11:01:36.470Z
2017-08-21T11:01:36.470Z
meshcollider
<p>I was trying to figure out how exactly the Blockchain gap limit works. I've read the following question on Bitcoin Beta: <a href="https://bitcoin.stackexchange.com/questions/48090/how-to-solve-blockchain-20-address-gap-limit-problem">How to solve Blockchain 20 address gap-limit problem?</a> and started thinking. Maybe I am not getting this right, but in the answer to that question, it says, that the Blockchain will always <strong>look ahead</strong> 2-22 addresses, to see if any payment came inside, starting from the index of the address, that received payment last.</p>

<p>Am I correct in stating, that, if for example, 2 users try to send me a payment of XBT.</p>

<p>User 1, asks to deposit some XBT to me, gets an address from my site, with index 1. Then, a minute later, user 2 does the same, and gets an address with index 2. If in this case, user 2 makes the payment faster then user 1, the Blockchain won't see the payment from user 1, because from this onward, only addresses with index 2-24 will be checked? </p>

<p>If this is the case, this seems like a serious issue to me, maybe I am understanding something incorrectly, can anyone clear this up to me?</p>

<blockchain.info>
Blockchain gap limit
Adam Baranyai
# Blockchain gap limit

(Asked by: username_0 on 2017-08-21)

I was trying to figure out how exactly the Blockchain gap limit works. I've read the following question on Bitcoin Beta: [How to solve Blockchain 20 address gap-limit problem?](https://bitcoin.stackexchange.com/questions/48090/how-to-solve-blockchain-20-address-gap-limit-problem) and started thinking. Maybe I am not getting this right, but in the answer to that question, it says, that the Blockchain will always **look ahead** 2-22 addresses, to see if any payment came inside, starting from the index of the address, that received payment last.

Am I correct in stating, that, if for example, 2 users try to send me a payment of XBT.

User 1, asks to deposit some XBT to me, gets an address from my site, with index 1. Then, a minute later, user 2 does the same, and gets an address with index 2. If in this case, user 2 makes the payment faster then user 1, the Blockchain won't see the payment from user 1, because from this onward, only addresses with index 2-24 will be checked?

If this is the case, this seems like a serious issue to me, maybe I am understanding something incorrectly, can anyone clear this up to me?

**Tags:** blockchain.info


---

## 1 answers

### Answer by username_1 on 2017-08-21. Score: 2 | Accepted answer

No, that's not how it works. Blockchain (and most other HD wallets by default, as set in BIP 44) look forward 20 addresses before deciding that no more are being used, it doesn't ignore the ones before that. Its purely a way of telling which ones you're using, because you can generate effectively as many as you want using incremental indices, and you wallet shouldnt have to check them *all* every time you update your balance. So it checks index 1, then 2, and so on, until it finds a stretch of 20 unused addresses in a row before assuming it's reached the end of the addresses you are using currently. If at some point in the future, you received a payment on one of those 20 in the gap, the wallet would begin looking 20 indices higher from that one.

So the only way you could miss payments is if they were too far in the *higher* indices not lower, e.g. no payments on indices above 10 but one on 30 would go unseen, because the wallet would give up looking after 20 unused. That's why blockchain usually warns you if you're approaching the gap limit rather than silently letting you.

> **Comments:**
> **username_2**: what happen if we reach the gap limit? is always something that we can fix just increasing that number in our wallet or we could loose the funds forever in some cases? my question here: https://bitcoin.stackexchange.com/questions/88128/gap-limit-is-always-a-problem-possible-to-fix  

---

