Initial getheaders request



Summary:

A developer named Daniel has found some code in bitcoin's src/main.cpp that seems to be using a *preceding* block as the "from argument" instead of pindexBestHeader. The initial "getheaders" request around line 4960 of the code is what he stumbled upon. He points out that the request on line 4132, which is done in response to a newly announced block, does use pindexBestHeader. While he sees no apparent reason for using the preceding call, changing it to pindexBestHeader on line 4960 causes the wallet.py test to get stuck. Daniel is unable to figure out why this is happening and wants someone to help him understand. He thinks that this is something that should be explained in a comment around line 4960. If he gets help and understands the issue, he will write a pull request for it, which will save others time wondering about this issue.


Updated on: 2023-06-11T00:06:16.104586+00:00