aboutsummaryrefslogtreecommitdiff
path: root/src/protocol.h
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2016-06-06 01:26:52 -0700
committerMatt Corallo <git@bluematt.me>2016-06-19 01:34:57 -0700
commit00c40784fe737ca67122fdec6538c450d2a516f3 (patch)
treef0a723ceaa2e8fc91077067efd4482573bb03aff /src/protocol.h
parente3b2222144a0def7fa61822bdd11fb7e6bdc70ec (diff)
downloadbitcoin-00c40784fe737ca67122fdec6538c450d2a516f3.tar.xz
Add protocol messages for short-ids blocks
Diffstat (limited to 'src/protocol.h')
-rw-r--r--src/protocol.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/src/protocol.h b/src/protocol.h
index ab0a581783..a72813e959 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -217,6 +217,32 @@ extern const char *SENDHEADERS;
* @since protocol version 70013 as described by BIP133
*/
extern const char *FEEFILTER;
+/**
+ * Contains a 1-byte bool and 8-byte LE version number.
+ * Indicates that a node is willing to provide blocks via "cmpctblock" messages.
+ * May indicate that a node prefers to receive new block announcements via a
+ * "cmpctblock" message rather than an "inv", depending on message contents.
+ * @since protocol version 70014 as described by BIP 152
+ */
+extern const char *SENDCMPCT;
+/**
+ * Contains a CBlockHeaderAndShortTxIDs object - providing a header and
+ * list of "short txids".
+ * @since protocol version 70014 as described by BIP 152
+ */
+extern const char *CMPCTBLOCK;
+/**
+ * Contains a BlockTransactionsRequest
+ * Peer should respond with "blocktxn" message.
+ * @since protocol version 70014 as described by BIP 152
+ */
+extern const char *GETBLOCKTXN;
+/**
+ * Contains a BlockTransactions.
+ * Sent in response to a "getblocktxn" message.
+ * @since protocol version 70014 as described by BIP 152
+ */
+extern const char *BLOCKTXN;
};
/* Get a vector of all valid message types (see above) */
@@ -315,9 +341,10 @@ public:
enum {
MSG_TX = 1,
MSG_BLOCK,
- // Nodes may always request a MSG_FILTERED_BLOCK in a getdata, however,
- // MSG_FILTERED_BLOCK should not appear in any invs except as a part of getdata.
+ // Nodes may always request a MSG_FILTERED_BLOCK/MSG_CMPCT_BLOCK in a getdata, however,
+ // MSG_FILTERED_BLOCK/MSG_CMPCT_BLOCK should not appear in any invs except as a part of getdata.
MSG_FILTERED_BLOCK,
+ MSG_CMPCT_BLOCK,
};
#endif // BITCOIN_PROTOCOL_H