aboutsummaryrefslogtreecommitdiff
path: root/src/protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol.h')
-rw-r--r--src/protocol.h27
1 files changed, 7 insertions, 20 deletions
diff --git a/src/protocol.h b/src/protocol.h
index 26e64b0009..0bef12ee62 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -11,6 +11,7 @@
#define BITCOIN_PROTOCOL_H
#include <netaddress.h>
+#include <primitives/transaction.h>
#include <serialize.h>
#include <uint256.h>
#include <version.h>
@@ -63,100 +64,84 @@ namespace NetMsgType {
/**
* The version message provides information about the transmitting node to the
* receiving node at the beginning of a connection.
- * @see https://bitcoin.org/en/developer-reference#version
*/
extern const char* VERSION;
/**
* The verack message acknowledges a previously-received version message,
* informing the connecting node that it can begin to send other messages.
- * @see https://bitcoin.org/en/developer-reference#verack
*/
extern const char* VERACK;
/**
* The addr (IP address) message relays connection information for peers on the
* network.
- * @see https://bitcoin.org/en/developer-reference#addr
*/
extern const char* ADDR;
/**
* The inv message (inventory message) transmits one or more inventories of
* objects known to the transmitting peer.
- * @see https://bitcoin.org/en/developer-reference#inv
*/
extern const char* INV;
/**
* The getdata message requests one or more data objects from another node.
- * @see https://bitcoin.org/en/developer-reference#getdata
*/
extern const char* GETDATA;
/**
* The merkleblock message is a reply to a getdata message which requested a
* block using the inventory type MSG_MERKLEBLOCK.
* @since protocol version 70001 as described by BIP37.
- * @see https://bitcoin.org/en/developer-reference#merkleblock
*/
extern const char* MERKLEBLOCK;
/**
* The getblocks message requests an inv message that provides block header
* hashes starting from a particular point in the block chain.
- * @see https://bitcoin.org/en/developer-reference#getblocks
*/
extern const char* GETBLOCKS;
/**
* The getheaders message requests a headers message that provides block
* headers starting from a particular point in the block chain.
* @since protocol version 31800.
- * @see https://bitcoin.org/en/developer-reference#getheaders
*/
extern const char* GETHEADERS;
/**
* The tx message transmits a single transaction.
- * @see https://bitcoin.org/en/developer-reference#tx
*/
extern const char* TX;
/**
* The headers message sends one or more block headers to a node which
* previously requested certain headers with a getheaders message.
* @since protocol version 31800.
- * @see https://bitcoin.org/en/developer-reference#headers
*/
extern const char* HEADERS;
/**
* The block message transmits a single serialized block.
- * @see https://bitcoin.org/en/developer-reference#block
*/
extern const char* BLOCK;
/**
* The getaddr message requests an addr message from the receiving node,
* preferably one with lots of IP addresses of other receiving nodes.
- * @see https://bitcoin.org/en/developer-reference#getaddr
*/
extern const char* GETADDR;
/**
* 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.
* @since protocol version 60002.
- * @see https://bitcoin.org/en/developer-reference#mempool
*/
extern const char* MEMPOOL;
/**
* The ping message is sent periodically to help confirm that the receiving
* peer is still connected.
- * @see https://bitcoin.org/en/developer-reference#ping
*/
extern const char* PING;
/**
* The pong message replies to a ping message, proving to the pinging node that
* the ponging node is still alive.
* @since protocol version 60001 as described by BIP31.
- * @see https://bitcoin.org/en/developer-reference#pong
*/
extern const char* PONG;
/**
* The notfound message is a reply to a getdata message which requested an
* object the receiving node does not have available for relay.
* @since protocol version 70001.
- * @see https://bitcoin.org/en/developer-reference#notfound
*/
extern const char* NOTFOUND;
/**
@@ -165,7 +150,6 @@ extern const char* NOTFOUND;
* @since protocol version 70001 as described by BIP37.
* Only available with service bit NODE_BLOOM since protocol version
* 70011 as described by BIP111.
- * @see https://bitcoin.org/en/developer-reference#filterload
*/
extern const char* FILTERLOAD;
/**
@@ -174,7 +158,6 @@ extern const char* FILTERLOAD;
* @since protocol version 70001 as described by BIP37.
* Only available with service bit NODE_BLOOM since protocol version
* 70011 as described by BIP111.
- * @see https://bitcoin.org/en/developer-reference#filteradd
*/
extern const char* FILTERADD;
/**
@@ -183,14 +166,12 @@ extern const char* FILTERADD;
* @since protocol version 70001 as described by BIP37.
* Only available with service bit NODE_BLOOM since protocol version
* 70011 as described by BIP111.
- * @see https://bitcoin.org/en/developer-reference#filterclear
*/
extern const char* FILTERCLEAR;
/**
* Indicates that a node prefers to receive new block announcements via a
* "headers" message rather than an "inv".
* @since protocol version 70012 as described by BIP130.
- * @see https://bitcoin.org/en/developer-reference#sendheaders
*/
extern const char* SENDHEADERS;
/**
@@ -291,6 +272,9 @@ enum ServiceFlags : uint64_t {
// NODE_WITNESS indicates that a node can be asked for blocks and transactions including
// witness data.
NODE_WITNESS = (1 << 3),
+ // NODE_COMPACT_FILTERS means the node will service basic block filter requests.
+ // See BIP157 and BIP158 for details on how this is implemented.
+ NODE_COMPACT_FILTERS = (1 << 6),
// NODE_NETWORK_LIMITED means the same as NODE_NETWORK with the limitation of only
// serving the last 288 (2 day) blocks
// See BIP159 for details on how this is implemented.
@@ -442,4 +426,7 @@ public:
uint256 hash;
};
+/** Convert a TX/WITNESS_TX/WTX CInv to a GenTxid. */
+GenTxid ToGenTxid(const CInv& inv);
+
#endif // BITCOIN_PROTOCOL_H