From bf2e010973e94c8ca2800c434cceb8bdb767f71c Mon Sep 17 00:00:00 2001 From: Karl-Johan Alm Date: Thu, 17 May 2018 14:50:15 +0900 Subject: uint256: Remove unnecessary crypto/common.h use --- src/hash.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/hash.h') diff --git a/src/hash.h b/src/hash.h index 3534a400b3..1645eceb03 100644 --- a/src/hash.h +++ b/src/hash.h @@ -6,6 +6,7 @@ #ifndef BITCOIN_HASH_H #define BITCOIN_HASH_H +#include #include #include #include @@ -138,6 +139,15 @@ public: return result; } + /** + * Returns the first 64 bits from the resulting hash. + */ + inline uint64_t GetCheapHash() { + unsigned char result[CHash256::OUTPUT_SIZE]; + ctx.Finalize(result); + return ReadLE64(result); + } + template CHashWriter& operator<<(const T& obj) { // Serialize to this stream -- cgit v1.2.3