mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-11 15:48:05 +00:00
Optimize GetWitnessHash() for non-segwit transactions
This commit is contained in:
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…
Reference in New Issue
Block a user