Optimize GetWitnessHash() for non-segwit transactions

pull/9912/head
Suhas Daftuar 8 years ago
parent d19d45a1e6
commit 02c57b521a

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

Loading…
Cancel
Save