mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-11 15:48:05 +00:00
Merge #9912: Optimize GetWitnessHash() for non-segwit transactions
02c57b5
Optimize GetWitnessHash() for non-segwit transactions (Suhas Daftuar)
Tree-SHA512: 405d07c11930f3432ae25b11232466a30ba2339be98e0fb5149934d792e014f504fedbe62b9c8e5febbbdad459bd1573ea896e527b9aa591926bbc774b895e6a
This commit is contained in:
commit
6015df5b85
@ -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…
Reference in New Issue
Block a user