Add GetTxid() which returns a non-malleable txid.

This commit is contained in:
Simon
2016-07-22 14:09:38 -07:00
parent 6dfc9e7a7c
commit 49689a574c
2 changed files with 35 additions and 0 deletions

View File

@@ -373,6 +373,10 @@ public:
}
std::string ToString() const;
// Return the txid which is the double SHA256 hash of the transaction.
uint256 GetTxid() const;
};
/** A mutable version of CTransaction. */
@@ -411,6 +415,9 @@ struct CMutableTransaction
* fly, as opposed to GetHash() in CTransaction, which uses a cached result.
*/
uint256 GetHash() const;
// Compute a non-malleable txid on the fly.
uint256 GetTxid() const;
};
#endif // BITCOIN_PRIMITIVES_TRANSACTION_H