We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9ad4d5 commit d50fbd4Copy full SHA for d50fbd4
src/primitives/transaction.h
@@ -393,6 +393,8 @@ class GenTxid
393
uint256 m_hash;
394
public:
395
GenTxid(bool is_wtxid, const uint256& hash) : m_is_wtxid(is_wtxid), m_hash(hash) {}
396
+ static GenTxid Txid(const uint256& hash) { return GenTxid{false, hash}; }
397
+ static GenTxid Wtxid(const uint256& hash) { return GenTxid{true, hash}; }
398
bool IsWtxid() const { return m_is_wtxid; }
399
const uint256& GetHash() const { return m_hash; }
400
friend bool operator==(const GenTxid& a, const GenTxid& b) { return a.m_is_wtxid == b.m_is_wtxid && a.m_hash == b.m_hash; }
0 commit comments