Request the sequence of blocks that occur after a specific block. If the specified block is on the server’s most-work chain, the server responds with a set of up to 500 inv
messages identifying the next blocks on that chain. If the specified block is not on the most-work chain, the server uses block information in the locator structure to determine the fork point and provides inv
messages from that point.
Field | Length | Format | Description |
---|---|---|---|
locator | variable | vector of 32 byte block hash identifiers | identifies the desired blocks location in the blockchain |
stop at hash | 32 bytes | bytes | send no more INVs if this hash is encountered |
See getheaders
for a detailed description of the Locator object.
The response will begin at the child of the first hash in the locator list that matches a block hash identifier held by the responder. If no hashes match, there will be no INV messages sent.
Use an empty locator to get an inv
for block 1, and getheaders
that block to discover the genesis block hash in the prevBlock field
The sender will stop sending inventory messages if it encounters this hash. If the hash is never encountered, the sender will stop after 500 inventory messages or when it hits the blockchain tip.