Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: increase the number of bitcoin in flight requests to 1000. (#3768)
Before, the maximum number of queued up blocks that were tried to be downloaded was 100. The blocks are prioritized in a deterministic BFS fashion (closest 100 to the anchor are tried to be downloaded). Because testnet4 can have many (>100) forked blocks, this can lead to all closest 100 blocks to be outside of the main chain. When asked for these blocks, the peers simply timeout. This leads to the adapter not downloading anything, and getting stuck, as in the next iteration, the same 100 blocks will be retried. After, the maximum number of blocks that are to be found in the BFS is increased to 1000. The testnet4 does not currently reach that many forked blocks, so this is a fine temporary fix. In the future, we ought to find a more robust way of dealing with forked blocks, (black-list timed-out blocks? DFS instead of BFS?). Note that the maximum number of blocks returned in the `next` field of the response is still 100.
- Loading branch information