diff options
Diffstat (limited to 'src/primitives/transaction.cpp')
-rw-r--r-- | src/primitives/transaction.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp index 790bc71d14..28ef1fb464 100644 --- a/src/primitives/transaction.cpp +++ b/src/primitives/transaction.cpp @@ -69,6 +69,9 @@ uint256 CTransaction::ComputeHash() const uint256 CTransaction::GetWitnessHash() const { + if (!HasWitness()) { + return GetHash(); + } return SerializeHash(*this, SER_GETHASH, 0); } |