mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-09 19:13:28 +02:00
p2p: add CInv block message helper methods
This commit is contained in:
@@ -419,11 +419,21 @@ public:
|
||||
|
||||
// Single-message helper methods
|
||||
bool IsMsgTx() const { return type == MSG_TX; }
|
||||
bool IsMsgBlk() const { return type == MSG_BLOCK; }
|
||||
bool IsMsgWtx() const { return type == MSG_WTX; }
|
||||
bool IsMsgWitnessTx() const { return type == MSG_WITNESS_TX; }
|
||||
bool IsMsgFilteredBlk() const { return type == MSG_FILTERED_BLOCK; }
|
||||
bool IsMsgCmpctBlk() const { return type == MSG_CMPCT_BLOCK; }
|
||||
bool IsMsgWitnessBlk() const { return type == MSG_WITNESS_BLOCK; }
|
||||
|
||||
// Combined-message helper methods
|
||||
bool IsGenTxMsg() const { return type == MSG_TX || type == MSG_WTX || type == MSG_WITNESS_TX; }
|
||||
bool IsGenTxMsg() const
|
||||
{
|
||||
return type == MSG_TX || type == MSG_WTX || type == MSG_WITNESS_TX;
|
||||
}
|
||||
bool IsGenBlkMsg() const
|
||||
{
|
||||
return type == MSG_BLOCK || type == MSG_FILTERED_BLOCK || type == MSG_CMPCT_BLOCK || type == MSG_WITNESS_BLOCK;
|
||||
}
|
||||
|
||||
int type;
|
||||
uint256 hash;
|
||||
|
Reference in New Issue
Block a user