diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2024-02-15 15:32:28 +0100 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2024-02-28 18:03:23 +0100 |
commit | b3efb486732f3caf8b8a8e9d744e6d20ae4255ef (patch) | |
tree | 17f78559d56662a1eeeeb2e0ef3cb23c3abdabe4 /src/protocol.cpp | |
parent | 2fa9de06c2c8583ee8e2434dc97014b26e218ab5 (diff) | |
download | bitcoin-b3efb486732f3caf8b8a8e9d744e6d20ae4255ef.tar.xz |
protocol: make message types constexpr
As a side effect the names of the constants do not have to be
repeated in `src/protocol.cpp`.
Diffstat (limited to 'src/protocol.cpp')
-rw-r--r-- | src/protocol.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/protocol.cpp b/src/protocol.cpp index b85571315a..0439d398c7 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -7,46 +7,6 @@ #include <common/system.h> -#include <atomic> - -namespace NetMsgType { -const char* VERSION = "version"; -const char* VERACK = "verack"; -const char* ADDR = "addr"; -const char* ADDRV2 = "addrv2"; -const char* SENDADDRV2 = "sendaddrv2"; -const char* INV = "inv"; -const char* GETDATA = "getdata"; -const char* MERKLEBLOCK = "merkleblock"; -const char* GETBLOCKS = "getblocks"; -const char* GETHEADERS = "getheaders"; -const char* TX = "tx"; -const char* HEADERS = "headers"; -const char* BLOCK = "block"; -const char* GETADDR = "getaddr"; -const char* MEMPOOL = "mempool"; -const char* PING = "ping"; -const char* PONG = "pong"; -const char* NOTFOUND = "notfound"; -const char* FILTERLOAD = "filterload"; -const char* FILTERADD = "filteradd"; -const char* FILTERCLEAR = "filterclear"; -const char* SENDHEADERS = "sendheaders"; -const char* FEEFILTER = "feefilter"; -const char* SENDCMPCT = "sendcmpct"; -const char* CMPCTBLOCK = "cmpctblock"; -const char* GETBLOCKTXN = "getblocktxn"; -const char* BLOCKTXN = "blocktxn"; -const char* GETCFILTERS = "getcfilters"; -const char* CFILTER = "cfilter"; -const char* GETCFHEADERS = "getcfheaders"; -const char* CFHEADERS = "cfheaders"; -const char* GETCFCHECKPT = "getcfcheckpt"; -const char* CFCHECKPT = "cfcheckpt"; -const char* WTXIDRELAY = "wtxidrelay"; -const char* SENDTXRCNCL = "sendtxrcncl"; -} // namespace NetMsgType - CMessageHeader::CMessageHeader(const MessageStartChars& pchMessageStartIn, const char* pszCommand, unsigned int nMessageSizeIn) : pchMessageStart{pchMessageStartIn} { |