Browse Source

Optimize GetWitnessHash() for non-segwit transactions

Github-Pull: #9912
Rebased-From: 02c57b521a
0.14
Suhas Daftuar 8 years ago committed by MarcoFalke
parent
commit
fc3d7db580
  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