0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-03 09:56:38 -05:00

Optimize GetWitnessHash() for non-segwit transactions

This commit is contained in:
Suhas Daftuar 2017-03-03 13:33:32 -05:00
parent d19d45a1e6
commit 02c57b521a

View file

@ -69,6 +69,9 @@ uint256 CTransaction::ComputeHash() const
uint256 CTransaction::GetWitnessHash() const
{
if (!HasWitness()) {
return GetHash();
}
return SerializeHash(*this, SER_GETHASH, 0);
}