Changeset View
Changeset View
Standalone View
Standalone View
src/protocol.h
Show First 20 Lines • Show All 526 Lines • ▼ Show 20 Lines | public: | ||||
std::string ToString() const; | std::string ToString() const; | ||||
uint32_t GetKind() const { return type & MSG_TYPE_MASK; } | uint32_t GetKind() const { return type & MSG_TYPE_MASK; } | ||||
bool IsMsgTx() const { | bool IsMsgTx() const { | ||||
auto k = GetKind(); | auto k = GetKind(); | ||||
return k == MSG_TX; | return k == MSG_TX; | ||||
} | } | ||||
bool IsMsgBlk() const { | |||||
auto k = GetKind(); | |||||
return k == MSG_BLOCK; | |||||
} | |||||
bool IsMsgFilteredBlk() const { | |||||
auto k = GetKind(); | |||||
return k == MSG_FILTERED_BLOCK; | |||||
} | |||||
bool IsMsgCmpctBlk() const { | |||||
auto k = GetKind(); | |||||
return k == MSG_CMPCT_BLOCK; | |||||
} | |||||
bool IsSomeBlock() const { | bool IsGenBlkMsg() const { | ||||
auto k = GetKind(); | auto k = GetKind(); | ||||
return k == MSG_BLOCK || k == MSG_FILTERED_BLOCK || | return k == MSG_BLOCK || k == MSG_FILTERED_BLOCK || | ||||
k == MSG_CMPCT_BLOCK; | k == MSG_CMPCT_BLOCK; | ||||
} | } | ||||
}; | }; | ||||
#endif // BITCOIN_PROTOCOL_H | #endif // BITCOIN_PROTOCOL_H |