The CBlockLocator strucuture's purpose is:
Describes a place in the block chain to another node such that if the other node doesn't have the same branch, it can find a recent common trunk. The further back it is, the further before the fork it may be.
/** Describes a place in the block chain to another node such that if the
* other node doesn't have the same branch, it can find a recent common trunk.
* The further back it is, the further before the fork it may be.
*/
struct CBlockLocator
{
std::vector<uint256> vHave;
But it's not clear to me how does it works. How does the sender specify the Block with A
in this structure? Does the vHave
contains a list of contiguous block hashes previous to A
and A
itself?