Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
protocol.h
Go to the documentation of this file.
37 static constexpr size_t HEADER_SIZE = MESSAGE_START_SIZE + COMMAND_SIZE + MESSAGE_SIZE_SIZE + CHECKSUM_SIZE;
41 CMessageHeader(const MessageStartChars& pchMessageStartIn, const char* pszCommand, unsigned int nMessageSizeIn);
283 // NODE_NETWORK means that the node is capable of serving the complete block chain. It is currently
404 // NOTE: declare non-implmented here, we must keep this enum consistent and backwards compatible
const char * PING
The ping message is sent periodically to help confirm that the receiving peer is still connected...
Definition: protocol.cpp:31
const char * FILTERLOAD
The filterload message tells the receiving peer to filter all relayed transactions and requested merk...
Definition: protocol.cpp:34
const char * MERKLEBLOCK
The merkleblock message is a reply to a getdata message which requested a block using the inventory t...
Definition: protocol.cpp:23
Definition: protocol.h:411
Definition: protocol.h:419
Definition: protocol.h:405
const std::vector< std::string > & getAllNetMessageTypes()
Definition: protocol.cpp:293
const char * GETADDR
The getaddr message requests an addr message from the receiving node, preferably one with lots of IP ...
Definition: protocol.cpp:29
Definition: protocol.h:399
const char * SENDCMPCT
Contains a 1-byte bool and 8-byte LE version number.
Definition: protocol.cpp:39
void SerializationOp(Stream &s, Operation ser_action)
Definition: protocol.h:369
Definition: protocol.h:285
CMessageHeader(const MessageStartChars &pchMessageStartIn)
Definition: protocol.cpp:148
void SerializationOp(Stream &s, Operation ser_action)
Definition: protocol.h:49
Definition: protocol.h:293
Definition: protocol.h:400
const char * PONG
The pong message replies to a ping message, proving to the pinging node that the ponging node is stil...
Definition: protocol.cpp:32
bool IsValid(const MessageStartChars &messageStart) const
Definition: protocol.cpp:170
const char * HEADERS
The headers message sends one or more block headers to a node which previously requested certain head...
Definition: protocol.cpp:27
Definition: protocol.h:300
const char * INV
The inv message (inventory message) transmits one or more inventories of objects known to the transmi...
Definition: protocol.cpp:21
Definition: protocol.h:398
ServiceFlags GetDesirableServiceFlags(ServiceFlags services)
Gets the set of service flags which are "desirable" for a given peer.
Definition: protocol.cpp:201
Definition: protocol.h:282
const char * GETHEADERS
The getheaders message requests a headers message that provides block headers starting from a particu...
Definition: protocol.cpp:25
static bool HasAllDesirableServiceFlags(ServiceFlags services)
A shortcut for (services & GetDesirableServiceFlags(services)) == GetDesirableServiceFlags(services)...
Definition: protocol.h:345
Definition: protocol.h:416
Definition: protocol.h:420
Definition: protocol.h:418
A combination of a network address (CNetAddr) and a (TCP) port.
Definition: netaddress.h:143
const char * SENDHEADERS
Indicates that a node prefers to receive new block announcements via a "headers" message rather than ...
Definition: protocol.cpp:38
const char * MEMPOOL
The mempool message requests the TXIDs of transactions that the receiving node has verified as valid ...
Definition: protocol.cpp:30
Definition: protocol.h:424
const char * ADDR
The addr (IP address) message relays connection information for peers on the network.
Definition: protocol.cpp:20
const char * FILTERCLEAR
The filterclear message tells the receiving peer to remove a previously-set bloom filter...
Definition: protocol.cpp:36
const char * NOTFOUND
The notfound message is a reply to a getdata message which requested an object the receiving node doe...
Definition: protocol.cpp:33
const char * BLOCK
The block message transmits a single serialized block.
Definition: protocol.cpp:28
Definition: protocol.h:407
static bool MayHaveUsefulAddressDB(ServiceFlags services)
Checks if a peer with the given service flags may be capable of having a robust address-storage DB...
Definition: protocol.h:353
unsigned char MessageStartChars[MESSAGE_START_SIZE]
Definition: protocol.h:38
const char * REJECT
The reject message informs the receiving node that one of its previous messages has been rejected...
Definition: protocol.cpp:37
static constexpr size_t MESSAGE_SIZE_OFFSET
Definition: protocol.h:35
static constexpr size_t MESSAGE_START_SIZE
Definition: protocol.h:31
const char * GETBLOCKS
The getblocks message requests an inv message that provides block header hashes starting from a parti...
Definition: protocol.cpp:24
void SetServiceFlagsIBDCache(bool status)
Set the current IBD status in order to figure out the desirable service flags.
Definition: protocol.cpp:208
const char * VERACK
The verack message acknowledges a previously-received version message, informing the connecting node ...
Definition: protocol.cpp:19
Definition: protocol.h:409
const char * CMPCTBLOCK
Contains a CBlockHeaderAndShortTxIDs object - providing a header and list of "short txids"...
Definition: protocol.cpp:40
const char * VERSION
The version message provides information about the transmitting node to the receiving node at the beg...
Definition: protocol.cpp:18
static const int CADDR_TIME_VERSION
nTime field added to CAddress, starting with this version; if possible, avoid requesting addresses no...
Definition: version.h:30
const char * GETDATA
The getdata message requests one or more data objects from another node.
Definition: protocol.cpp:22
Definition: protocol.h:421
Definition: protocol.h:425
void SerializationOp(Stream &s, Operation ser_action)
Definition: protocol.h:438
Definition: protocol.h:296
Definition: protocol.h:410
Definition: protocol.h:423
Definition: protocol.h:289
Definition: serialize.h:162
const char * FILTERADD
The filteradd message tells the receiving peer to add a single element to a previously-set bloom filt...
Definition: protocol.cpp:35
Definition: serialize.h:161
const char * GETBLOCKTXN
Contains a BlockTransactionsRequest Peer should respond with "blocktxn" message.
Definition: protocol.cpp:41