Changeset View
Changeset View
Standalone View
Standalone View
src/protocol.h
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | |||||
* Bitcoin protocol message types. When adding new message types, don't forget | * Bitcoin protocol message types. When adding new message types, don't forget | ||||
* to update allNetMessageTypes in protocol.cpp. | * to update allNetMessageTypes in protocol.cpp. | ||||
*/ | */ | ||||
namespace NetMsgType { | namespace NetMsgType { | ||||
/** | /** | ||||
* The version message provides information about the transmitting node to the | * The version message provides information about the transmitting node to the | ||||
* receiving node at the beginning of a connection. | * receiving node at the beginning of a connection. | ||||
* @see https://bitcoin.org/en/developer-reference#version | |||||
*/ | */ | ||||
extern const char *VERSION; | extern const char *VERSION; | ||||
/** | /** | ||||
* The verack message acknowledges a previously-received version message, | * The verack message acknowledges a previously-received version message, | ||||
* informing the connecting node that it can begin to send other messages. | * informing the connecting node that it can begin to send other messages. | ||||
* @see https://bitcoin.org/en/developer-reference#verack | |||||
*/ | */ | ||||
extern const char *VERACK; | extern const char *VERACK; | ||||
/** | /** | ||||
* The addr (IP address) message relays connection information for peers on the | * The addr (IP address) message relays connection information for peers on the | ||||
* network. | * network. | ||||
* @see https://bitcoin.org/en/developer-reference#addr | |||||
*/ | */ | ||||
extern const char *ADDR; | extern const char *ADDR; | ||||
/** | /** | ||||
* The addrv2 message relays connection information for peers on the network | * The addrv2 message relays connection information for peers on the network | ||||
* just like the addr message, but is extended to allow gossiping of longer node | * just like the addr message, but is extended to allow gossiping of longer node | ||||
* addresses (see BIP155). | * addresses (see BIP155). | ||||
*/ | */ | ||||
extern const char *ADDRV2; | extern const char *ADDRV2; | ||||
/** | /** | ||||
* The sendaddrv2 message signals support for receiving ADDRV2 messages | * The sendaddrv2 message signals support for receiving ADDRV2 messages | ||||
* (BIP155). It also implies that its sender can encode as ADDRV2 and would send | * (BIP155). It also implies that its sender can encode as ADDRV2 and would send | ||||
* ADDRV2 instead of ADDR to a peer that has signaled ADDRV2 support by sending | * ADDRV2 instead of ADDR to a peer that has signaled ADDRV2 support by sending | ||||
* SENDADDRV2. | * SENDADDRV2. | ||||
*/ | */ | ||||
extern const char *SENDADDRV2; | extern const char *SENDADDRV2; | ||||
/** | /** | ||||
* The inv message (inventory message) transmits one or more inventories of | * The inv message (inventory message) transmits one or more inventories of | ||||
* objects known to the transmitting peer. | * objects known to the transmitting peer. | ||||
* @see https://bitcoin.org/en/developer-reference#inv | |||||
*/ | */ | ||||
extern const char *INV; | extern const char *INV; | ||||
/** | /** | ||||
* The getdata message requests one or more data objects from another node. | * The getdata message requests one or more data objects from another node. | ||||
* @see https://bitcoin.org/en/developer-reference#getdata | |||||
*/ | */ | ||||
extern const char *GETDATA; | extern const char *GETDATA; | ||||
/** | /** | ||||
* The merkleblock message is a reply to a getdata message which requested a | * The merkleblock message is a reply to a getdata message which requested a | ||||
* block using the inventory type MSG_MERKLEBLOCK. | * block using the inventory type MSG_MERKLEBLOCK. | ||||
* @since protocol version 70001 as described by BIP37. | * @since protocol version 70001 as described by BIP37. | ||||
* @see https://bitcoin.org/en/developer-reference#merkleblock | |||||
*/ | */ | ||||
extern const char *MERKLEBLOCK; | extern const char *MERKLEBLOCK; | ||||
/** | /** | ||||
* The getblocks message requests an inv message that provides block header | * The getblocks message requests an inv message that provides block header | ||||
* hashes starting from a particular point in the block chain. | * hashes starting from a particular point in the block chain. | ||||
* @see https://bitcoin.org/en/developer-reference#getblocks | |||||
*/ | */ | ||||
extern const char *GETBLOCKS; | extern const char *GETBLOCKS; | ||||
/** | /** | ||||
* The getheaders message requests a headers message that provides block | * The getheaders message requests a headers message that provides block | ||||
* headers starting from a particular point in the block chain. | * headers starting from a particular point in the block chain. | ||||
* @since protocol version 31800. | * @since protocol version 31800. | ||||
* @see https://bitcoin.org/en/developer-reference#getheaders | |||||
*/ | */ | ||||
extern const char *GETHEADERS; | extern const char *GETHEADERS; | ||||
/** | /** | ||||
* The tx message transmits a single transaction. | * The tx message transmits a single transaction. | ||||
* @see https://bitcoin.org/en/developer-reference#tx | |||||
*/ | */ | ||||
extern const char *TX; | extern const char *TX; | ||||
/** | /** | ||||
* The headers message sends one or more block headers to a node which | * The headers message sends one or more block headers to a node which | ||||
* previously requested certain headers with a getheaders message. | * previously requested certain headers with a getheaders message. | ||||
* @since protocol version 31800. | * @since protocol version 31800. | ||||
* @see https://bitcoin.org/en/developer-reference#headers | |||||
*/ | */ | ||||
extern const char *HEADERS; | extern const char *HEADERS; | ||||
/** | /** | ||||
* The block message transmits a single serialized block. | * The block message transmits a single serialized block. | ||||
* @see https://bitcoin.org/en/developer-reference#block | |||||
*/ | */ | ||||
extern const char *BLOCK; | extern const char *BLOCK; | ||||
/** | /** | ||||
* The getaddr message requests an addr message from the receiving node, | * The getaddr message requests an addr message from the receiving node, | ||||
* preferably one with lots of IP addresses of other receiving nodes. | * preferably one with lots of IP addresses of other receiving nodes. | ||||
* @see https://bitcoin.org/en/developer-reference#getaddr | |||||
*/ | */ | ||||
extern const char *GETADDR; | extern const char *GETADDR; | ||||
/** | /** | ||||
* The mempool message requests the TXIDs of transactions that the receiving | * The mempool message requests the TXIDs of transactions that the receiving | ||||
* node has verified as valid but which have not yet appeared in a block. | * node has verified as valid but which have not yet appeared in a block. | ||||
* @since protocol version 60002. | * @since protocol version 60002. | ||||
* @see https://bitcoin.org/en/developer-reference#mempool | |||||
*/ | */ | ||||
extern const char *MEMPOOL; | extern const char *MEMPOOL; | ||||
/** | /** | ||||
* The ping message is sent periodically to help confirm that the receiving | * The ping message is sent periodically to help confirm that the receiving | ||||
* peer is still connected. | * peer is still connected. | ||||
* @see https://bitcoin.org/en/developer-reference#ping | |||||
*/ | */ | ||||
extern const char *PING; | extern const char *PING; | ||||
/** | /** | ||||
* The pong message replies to a ping message, proving to the pinging node that | * The pong message replies to a ping message, proving to the pinging node that | ||||
* the ponging node is still alive. | * the ponging node is still alive. | ||||
* @since protocol version 60001 as described by BIP31. | * @since protocol version 60001 as described by BIP31. | ||||
* @see https://bitcoin.org/en/developer-reference#pong | |||||
*/ | */ | ||||
extern const char *PONG; | extern const char *PONG; | ||||
/** | /** | ||||
* The notfound message is a reply to a getdata message which requested an | * The notfound message is a reply to a getdata message which requested an | ||||
* object the receiving node does not have available for relay. | * object the receiving node does not have available for relay. | ||||
* @since protocol version 70001. | * @since protocol version 70001. | ||||
* @see https://bitcoin.org/en/developer-reference#notfound | |||||
*/ | */ | ||||
extern const char *NOTFOUND; | extern const char *NOTFOUND; | ||||
/** | /** | ||||
* The filterload message tells the receiving peer to filter all relayed | * The filterload message tells the receiving peer to filter all relayed | ||||
* transactions and requested merkle blocks through the provided filter. | * transactions and requested merkle blocks through the provided filter. | ||||
* @since protocol version 70001 as described by BIP37. | * @since protocol version 70001 as described by BIP37. | ||||
* Only available with service bit NODE_BLOOM since protocol version | * Only available with service bit NODE_BLOOM since protocol version | ||||
* 70011 as described by BIP111. | * 70011 as described by BIP111. | ||||
* @see https://bitcoin.org/en/developer-reference#filterload | |||||
*/ | */ | ||||
extern const char *FILTERLOAD; | extern const char *FILTERLOAD; | ||||
/** | /** | ||||
* The filteradd message tells the receiving peer to add a single element to a | * The filteradd message tells the receiving peer to add a single element to a | ||||
* previously-set bloom filter, such as a new public key. | * previously-set bloom filter, such as a new public key. | ||||
* @since protocol version 70001 as described by BIP37. | * @since protocol version 70001 as described by BIP37. | ||||
* Only available with service bit NODE_BLOOM since protocol version | * Only available with service bit NODE_BLOOM since protocol version | ||||
* 70011 as described by BIP111. | * 70011 as described by BIP111. | ||||
* @see https://bitcoin.org/en/developer-reference#filteradd | |||||
*/ | */ | ||||
extern const char *FILTERADD; | extern const char *FILTERADD; | ||||
/** | /** | ||||
* The filterclear message tells the receiving peer to remove a previously-set | * The filterclear message tells the receiving peer to remove a previously-set | ||||
* bloom filter. | * bloom filter. | ||||
* @since protocol version 70001 as described by BIP37. | * @since protocol version 70001 as described by BIP37. | ||||
* Only available with service bit NODE_BLOOM since protocol version | * Only available with service bit NODE_BLOOM since protocol version | ||||
* 70011 as described by BIP111. | * 70011 as described by BIP111. | ||||
* @see https://bitcoin.org/en/developer-reference#filterclear | |||||
*/ | */ | ||||
extern const char *FILTERCLEAR; | extern const char *FILTERCLEAR; | ||||
/** | /** | ||||
* Indicates that a node prefers to receive new block announcements via a | * Indicates that a node prefers to receive new block announcements via a | ||||
* "headers" message rather than an "inv". | * "headers" message rather than an "inv". | ||||
* @since protocol version 70012 as described by BIP130. | * @since protocol version 70012 as described by BIP130. | ||||
* @see https://bitcoin.org/en/developer-reference#sendheaders | |||||
*/ | */ | ||||
extern const char *SENDHEADERS; | extern const char *SENDHEADERS; | ||||
/** | /** | ||||
* The feefilter message tells the receiving peer not to inv us any txs | * The feefilter message tells the receiving peer not to inv us any txs | ||||
* which do not meet the specified min fee rate. | * which do not meet the specified min fee rate. | ||||
* @since protocol version 70013 as described by BIP133 | * @since protocol version 70013 as described by BIP133 | ||||
*/ | */ | ||||
extern const char *FEEFILTER; | extern const char *FEEFILTER; | ||||
▲ Show 20 Lines • Show All 324 Lines • Show Last 20 Lines |