Changeset View
Changeset View
Standalone View
Standalone View
src/protocol.h
Show First 20 Lines • Show All 352 Lines • ▼ Show 20 Lines | enum ServiceFlags : uint64_t { | ||||
// do not actually support. Other service bits should be allocated via the | // do not actually support. Other service bits should be allocated via the | ||||
// BIP process. | // BIP process. | ||||
// NODE_AVALANCHE means the node supports Bitcoin Cash's avalanche | // NODE_AVALANCHE means the node supports Bitcoin Cash's avalanche | ||||
// preconsensus mechanism. | // preconsensus mechanism. | ||||
NODE_AVALANCHE = (1 << 24), | NODE_AVALANCHE = (1 << 24), | ||||
}; | }; | ||||
std::string serviceFlagToStr(uint64_t mask, int bit); | /** | ||||
* Convert service flags (a bitmask of NODE_*) to human readable strings. | |||||
* It supports unknown service flags which will be returned as "UNKNOWN[...]". | |||||
* @param[in] flags multiple NODE_* bitwise-OR-ed together | |||||
*/ | |||||
std::vector<std::string> serviceFlagsToStr(const uint64_t flags); | |||||
/** | /** | ||||
* Gets the set of service flags which are "desirable" for a given peer. | * Gets the set of service flags which are "desirable" for a given peer. | ||||
* | * | ||||
* These are the flags which are required for a peer to support for them | * These are the flags which are required for a peer to support for them | ||||
* to be "interesting" to us, ie for us to wish to use one of our few | * to be "interesting" to us, ie for us to wish to use one of our few | ||||
* outbound connection slots for or for us to wish to prioritize keeping | * outbound connection slots for or for us to wish to prioritize keeping | ||||
* their connection around. | * their connection around. | ||||
▲ Show 20 Lines • Show All 150 Lines • Show Last 20 Lines |