8 #error This header can only be compiled as C++. 11 #ifndef RAVEN_PROTOCOL_H 12 #define RAVEN_PROTOCOL_H 43 explicit CMessageHeader(
const MessageStartChars& pchMessageStartIn);
44 CMessageHeader(
const MessageStartChars& pchMessageStartIn,
const char* pszCommand,
unsigned int nMessageSizeIn);
47 bool IsValid(
const MessageStartChars& messageStart)
const;
51 template <
typename Stream,
typename Operation>
89 extern const char *
ADDR;
95 extern const char *
INV;
125 extern const char *
TX;
137 extern const char *
BLOCK;
156 extern const char *
PING;
163 extern const char *
PONG;
204 extern const char *
REJECT;
327 static inline bool HasAllDesirableServiceFlags(
ServiceFlags services) {
328 return !(GetDesirableServiceFlags(services) & (~services));
335 static inline bool MayHaveUsefulAddressDB(
ServiceFlags services) {
350 template <
typename Stream,
typename Operation>
353 if (ser_action.ForRead())
355 int nVersion = s.GetVersion();
359 (nVersion >= CADDR_TIME_VERSION && !(s.GetType() &
SER_GETHASH)))
361 uint64_t nServicesInt = nServices;
405 template <
typename Stream,
typename Operation>
415 std::string ToString()
const;
432 template <
typename Stream,
typename Operation>
440 std::string ToString()
const;
446 #endif // RAVEN_PROTOCOL_H const char * PING
The ping message is sent periodically to help confirm that the receiving peer is still connected...
const char * FILTERLOAD
The filterload message tells the receiving peer to filter all relayed transactions and requested merk...
const char * MERKLEBLOCK
The merkleblock message is a reply to a getdata message which requested a block using the inventory t...
const char * BLOCKTXN
Contains a BlockTransactions.
ServiceFlags
nServices flags
const char * ASSETNOTFOUND
The asstnotfound message is a reply to a getassetdata message which requested an object the receiving...
const std::vector< std::string > & getAllNetMessageTypes()
const char * GETADDR
The getaddr message requests an addr message from the receiving node, preferably one with lots of IP ...
const char * GETASSETDATA
Contains a AssetDataRequest.
const char * SENDCMPCT
Contains a 1-byte bool and 8-byte LE version number.
void SerializationOp(Stream &s, Operation ser_action)
GetDataMsg
getdata / inv message types.
const uint32_t MSG_WITNESS_FLAG
getdata message type flags
const uint32_t MSG_TYPE_MASK
const char * PONG
The pong message replies to a ping message, proving to the pinging node that the ponging node is stil...
const char * HEADERS
The headers message sends one or more block headers to a node which previously requested certain head...
const char * INV
The inv message (inventory message) transmits one or more inventories of objects known to the transmi...
const char * GETHEADERS
The getheaders message requests a headers message that provides block headers starting from a particu...
Raven protocol message types.
A combination of a network address (CNetAddr) and a (TCP) port.
Removed for reorganization.
const char * SENDHEADERS
Indicates that a node prefers to receive new block announcements via a "headers" message rather than ...
const char * MEMPOOL
The mempool message requests the TXIDs of transactions that the receiving node has verified as valid ...
A CService with information about it as peer.
const char * ADDR
The addr (IP address) message relays connection information for peers on the network.
const char * FILTERCLEAR
The filterclear message tells the receiving peer to remove a previously-set bloom filter...
const char * NOTFOUND
The notfound message is a reply to a getdata message which requested an object the receiving node doe...
const char * FEEFILTER
The feefilter message tells the receiving peer not to inv us any txs which do not meet the specified ...
const char * REJECT
The reject message informs the receiving node that one of its previous messages has been rejected...
const char * GETBLOCKS
The getblocks message requests an inv message that provides block header hashes starting from a parti...
bool operator<(const CNetAddr &a, const CNetAddr &b)
const char * VERACK
The verack message acknowledges a previously-received version message, informing the connecting node ...
void SerializationOp(Stream &s, Operation ser_action)
const char * CMPCTBLOCK
Contains a CBlockHeaderAndShortTxIDs object - providing a header and list of "short txids"...
const char * GETDATA
The getdata message requests one or more data objects from another node.
const char * ASSETDATA
Contains a AssetData Sent in response to a "getassetdata" message.
void SerializationOp(Stream &s, Operation ser_action)
const char * TX
The tx message transmits a single transaction.
const char * FILTERADD
The filteradd message tells the receiving peer to add a single element to a previously-set bloom filt...
const char * GETBLOCKTXN
Contains a BlockTransactionsRequest Peer should respond with "blocktxn" message.