diff options
Diffstat (limited to 'src/hash.h')
-rw-r--r-- | src/hash.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/hash.h b/src/hash.h index f2b627ff4f..d355b703ff 100644 --- a/src/hash.h +++ b/src/hash.h @@ -149,13 +149,11 @@ public: class CHashWriter : public HashWriter { private: - const int nType; const int nVersion; public: - CHashWriter(int nTypeIn, int nVersionIn) : nType(nTypeIn), nVersion(nVersionIn) {} + CHashWriter(int nVersionIn) : nVersion{nVersionIn} {} - int GetType() const { return nType; } int GetVersion() const { return nVersion; } template<typename T> @@ -223,15 +221,6 @@ public: } }; -/** Compute the 256-bit hash of an object's serialization. */ -template<typename T> -uint256 SerializeHash(const T& obj, int nType=SER_GETHASH, int nVersion=PROTOCOL_VERSION) -{ - CHashWriter ss(nType, nVersion); - ss << obj; - return ss.GetHash(); -} - /** Single-SHA256 a 32-byte input (represented as uint256). */ [[nodiscard]] uint256 SHA256Uint256(const uint256& input); |