aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-08-05 13:33:26 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-08-07 09:28:37 +0200
commit6c23b082033b627f31170166c07ab35fa6be9343 (patch)
tree530d8aedfae819f9db2229e12714956dd4cbf199
parent8d0d512bde834fe4abb618b9a139355ef8780e95 (diff)
CCoinsKeyHasher::operator() should return size_t
It currently returns uint64_t, which on older boost (at least 1.46) causes test failures on 32-bit systems. This problem was introduced in bc42503. Fixes #4634.
-rw-r--r--src/coins.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/coins.h b/src/coins.h
index 9f90fe6bd0..ff60288163 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -247,7 +247,10 @@ private:
public:
CCoinsKeyHasher();
- uint64_t operator()(const uint256& key) const {
+ // This *must* return size_t. With Boost 1.46 on 32-bit systems the
+ // unordered_map will behave unpredictably if the custom hasher returns a
+ // uint64_t, resulting in failures when syncing the chain (#4634).
+ size_t operator()(const uint256& key) const {
return key.GetHash(salt);
}
};