mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-25 04:41:10 +02:00
p2p: add CInv transaction message helper methods
This commit is contained in:
@@ -430,6 +430,14 @@ public:
|
||||
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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user