Changeset View
Changeset View
Standalone View
Standalone View
src/protocol.h
Show First 20 Lines • Show All 333 Lines • ▼ Show 20 Lines | |||||
public: | public: | ||||
ServiceFlags nServices; | ServiceFlags nServices; | ||||
// 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_EXT_FLAG = 1 << 29; | |||||
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. | ||||
//!< Defined in BIP37 | //!< Defined in BIP37 | ||||
MSG_FILTERED_BLOCK = 3, | MSG_FILTERED_BLOCK = 3, | ||||
//!< Defined in BIP152 | //!< Defined in BIP152 | ||||
MSG_CMPCT_BLOCK = 4, | MSG_CMPCT_BLOCK = 4, | ||||
//!< Extension block | |||||
MSG_EXT_TX = MSG_TX | MSG_EXT_FLAG, | |||||
MSG_EXT_BLOCK = MSG_BLOCK | MSG_EXT_FLAG, | |||||
}; | }; | ||||
/** inv message data */ | /** inv message data */ | ||||
class CInv { | class CInv { | ||||
public: | public: | ||||
CInv(); | CInv(); | ||||
CInv(int typeIn, const uint256 &hashIn); | CInv(int typeIn, const uint256 &hashIn); | ||||
Show All 33 Lines |