Browse Source

Merge #9912: Optimize GetWitnessHash() for non-segwit transactions

02c57b5 Optimize GetWitnessHash() for non-segwit transactions (Suhas Daftuar)

Tree-SHA512: 405d07c11930f3432ae25b11232466a30ba2339be98e0fb5149934d792e014f504fedbe62b9c8e5febbbdad459bd1573ea896e527b9aa591926bbc774b895e6a
pull/1/head
Wladimir J. van der Laan 6 years ago
parent
commit
6015df5b85
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 3
      src/primitives/transaction.cpp

3
src/primitives/transaction.cpp

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

Loading…
Cancel
Save