net: Run clang-format on protocol.h

Can be reviewed with the git diff flags
-U0 --ignore-all-space --word-diff-regex=.
This commit is contained in:
MarcoFalke 2020-05-17 10:30:06 -04:00
parent facdeea2b2
commit fabea6d404
No known key found for this signature in database
GPG key ID: CE2B75697E69A548

View file

@ -248,7 +248,7 @@ extern const char *GETCFCHECKPT;
* BIP 157 & 158. * BIP 157 & 158.
*/ */
extern const char* CFCHECKPT; extern const char* CFCHECKPT;
}; }; // 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();
@ -320,7 +320,8 @@ void SetServiceFlagsIBDCache(bool status);
* == GetDesirableServiceFlags(services), ie determines whether the given * == GetDesirableServiceFlags(services), ie determines whether the given
* set of service flags are sufficient for a peer to be "relevant". * set of service flags are sufficient for a peer to be "relevant".
*/ */
static inline bool HasAllDesirableServiceFlags(ServiceFlags services) { static inline bool HasAllDesirableServiceFlags(ServiceFlags services)
{
return !(GetDesirableServiceFlags(services) & (~services)); return !(GetDesirableServiceFlags(services) & (~services));
} }
@ -328,7 +329,8 @@ static inline bool HasAllDesirableServiceFlags(ServiceFlags services) {
* Checks if a peer with the given service flags may be capable of having a * Checks if a peer with the given service flags may be capable of having a
* robust address-storage DB. * robust address-storage DB.
*/ */
static inline bool MayHaveUsefulAddressDB(ServiceFlags services) { static inline bool MayHaveUsefulAddressDB(ServiceFlags services)
{
return (services & NODE_NETWORK) || (services & NODE_NETWORK_LIMITED); return (services & NODE_NETWORK) || (services & NODE_NETWORK_LIMITED);
} }
@ -374,8 +376,7 @@ const uint32_t MSG_TYPE_MASK = 0xffffffff >> 2;
* 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,