diff --git a/include/bitcoin/system/chain/transaction.hpp b/include/bitcoin/system/chain/transaction.hpp index c0a4897796..22f4a3526c 100644 --- a/include/bitcoin/system/chain/transaction.hpp +++ b/include/bitcoin/system/chain/transaction.hpp @@ -263,7 +263,7 @@ class BC_API transaction // Signature and identity hash cashing (witness hash if witnessed). mutable std::unique_ptr cache_{}; - mutable std::unique_ptr hash_{}; + mutable std::unique_ptr nominal_hash_{}; mutable std::unique_ptr witness_hash_{}; }; diff --git a/src/chain/transaction.cpp b/src/chain/transaction.cpp index aaeb372c55..f14c6f1721 100644 --- a/src/chain/transaction.cpp +++ b/src/chain/transaction.cpp @@ -410,7 +410,7 @@ uint64_t transaction::fee() const NOEXCEPT void transaction::set_hash(hash_digest&& hash) const NOEXCEPT { BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT) - hash_ = std::make_unique(std::move(hash)); + nominal_hash_ = std::make_unique(std::move(hash)); BC_POP_WARNING() } @@ -435,12 +435,12 @@ hash_digest transaction::hash(bool witness) const NOEXCEPT } else { - if (hash_) return *hash_; + if (nominal_hash_) return *nominal_hash_; } } else { - if (hash_) return *hash_; + if (nominal_hash_) return *nominal_hash_; if (witness_hash_) return *witness_hash_; }