HI,
I see some seemingly contradiction in the code and documentation in the develope reference of bitcoin
https://bitcoin.org/en/developer-reference#data-messagesThe currently-available type identifiers are:
Type Identifier | Name | Description |
1 | MSG_TX | The hash is a TXID |
2 | MSG_BLOCK | The hash is of a block header. |
3 | MSG_FILTERED_BLOCK | The hash is of a block header; identical to MSG_BLOCK. When used in a getdata message, this indicates the response should be a merkleblock message rather than a block message (but this only works if a bloom filter was previously configured). Only for use in getdata messages. |
Type identifier zero and type identifiers greater than three are reserved for future implementations. Bitcoin Core ignores all inventories with one of these unknown types.
Now if we look at code we see that type (3) is not mentioned in the code, when processing "inv" command. (module brd.c)
switch (inv->type) {
case MSG_TX: strcpy(typestr, "tx"); break;
case MSG_BLOCK: strcpy(typestr, "block"); break;
default: sprintf(typestr, "unknown 0x%x", inv->type); break;
}
Why does the brd.c not use MSG_FILTERED_BLOCK?? I am trying to understand the code with the bitcoin dev wiki.
Thanks for any answers you may give.