aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorKarl-Johan Alm <karljohan-alm@garage.co.jp>2018-05-17 14:50:15 +0900
committerKarl-Johan Alm <karljohan-alm@garage.co.jp>2018-09-18 14:27:05 +0900
commitbf2e010973e94c8ca2800c434cceb8bdb767f71c (patch)
treeec3824a1def9d498e7226a7ed393ba240ccabaf0 /src/validation.h
parentcb25cd6aa18c69918176d68e36e26f7e373aa48c (diff)
uint256: Remove unnecessary crypto/common.h use
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/validation.h b/src/validation.h
index 3df6456eca..7cfbc81473 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -12,6 +12,7 @@
#include <amount.h>
#include <coins.h>
+#include <crypto/common.h> // for ReadLE64
#include <fs.h>
#include <protocol.h> // For CMessageHeader::MessageStartChars
#include <policy/feerate.h>
@@ -138,7 +139,10 @@ static const int DEFAULT_STOPATHEIGHT = 0;
struct BlockHasher
{
- size_t operator()(const uint256& hash) const { return hash.GetCheapHash(); }
+ // this used to call `GetCheapHash()` in uint256, which was later moved; the
+ // cheap hash function simply calls ReadLE64() however, so the end result is
+ // identical
+ size_t operator()(const uint256& hash) const { return ReadLE64(hash.begin()); }
};
extern CScript COINBASE_FLAGS;