aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2014-08-08 11:28:16 +0200
committerWladimir J. van der Laan <[email protected]>2014-08-08 11:28:21 +0200
commitf5d99075bfe57006270e7f6271b1340148f45b84 (patch)
tree5f0e782ae2179ec4922a61681206091f952be311 /src
parentMerge pull request #4627 (diff)
parentCCoinsKeyHasher::operator() should return size_t (diff)
downloaddiscoin-f5d99075bfe57006270e7f6271b1340148f45b84.tar.xz
discoin-f5d99075bfe57006270e7f6271b1340148f45b84.zip
Merge pull request #4635
6c23b08 CCoinsKeyHasher::operator() should return size_t (Wladimir J. van der Laan)
Diffstat (limited to 'src')
-rw-r--r--src/coins.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/coins.h b/src/coins.h
index 9f90fe6bd..ff6028816 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);
}
};