diff --git a/src/protocol.h b/src/protocol.h index d83da2034ad2a..26e64b0009e48 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -430,6 +430,14 @@ class CInv std::string GetCommand() const; std::string ToString() const; + // Single-message helper methods + bool IsMsgTx() const { return type == MSG_TX; } + bool IsMsgWtx() const { return type == MSG_WTX; } + bool IsMsgWitnessTx() const { return type == MSG_WITNESS_TX; } + + // Combined-message helper methods + bool IsGenTxMsg() const { return type == MSG_TX || type == MSG_WTX || type == MSG_WITNESS_TX; } + int type; uint256 hash; };