Changeset View
Changeset View
Standalone View
Standalone View
src/protocol.h
Show First 20 Lines • Show All 301 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Indicate if the message is used to transmit the content of a block. | * Indicate if the message is used to transmit the content of a block. | ||||
* These messages can be significantly larger than usual messages and therefore | * These messages can be significantly larger than usual messages and therefore | ||||
* may need to be processed differently. | * may need to be processed differently. | ||||
*/ | */ | ||||
bool IsBlockLike(const std::string &strCommand); | bool IsBlockLike(const std::string &strCommand); | ||||
}; // namespace NetMsgType | }; // namespace NetMsgType | ||||
/* Get a vector of all valid message types (see above) */ | /** Get a vector of all valid message types (see above) */ | ||||
const std::vector<std::string> &getAllNetMessageTypes(); | const std::vector<std::string> &getAllNetMessageTypes(); | ||||
/** | /** | ||||
* nServices flags. | * nServices flags. | ||||
*/ | */ | ||||
enum ServiceFlags : uint64_t { | enum ServiceFlags : uint64_t { | ||||
// NOTE: When adding here, be sure to update serviceFlagToStr too | // NOTE: When adding here, be sure to update serviceFlagToStr too | ||||
// Nothing | // Nothing | ||||
▲ Show 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | public: | ||||
// disk and network only | // disk and network only | ||||
unsigned int nTime; | unsigned int nTime; | ||||
}; | }; | ||||
/** getdata message type flags */ | /** getdata message type flags */ | ||||
const uint32_t MSG_TYPE_MASK = 0xffffffff >> 3; | const uint32_t MSG_TYPE_MASK = 0xffffffff >> 3; | ||||
/** getdata / inv message types. | /** | ||||
* getdata / inv message types. | |||||
* These numbers are defined by the protocol. When adding a new value, be sure | * These numbers are defined by the protocol. When adding a new value, be sure | ||||
* to mention it in the respective BIP. | * to mention it in the respective BIP. | ||||
*/ | */ | ||||
enum GetDataMsg { | enum GetDataMsg { | ||||
UNDEFINED = 0, | UNDEFINED = 0, | ||||
MSG_TX = 1, | MSG_TX = 1, | ||||
MSG_BLOCK = 2, | MSG_BLOCK = 2, | ||||
// The following can only occur in getdata. Invs always use TX or BLOCK. | // The following can only occur in getdata. Invs always use TX or BLOCK. | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |