From 16652a93ea6d25674fe318ef5e213e98427c8947 Mon Sep 17 00:00:00 2001 From: Martin Zumsande Date: Tue, 11 May 2021 00:22:14 +0200 Subject: [PATCH 1/2] refactor: Remove unused KeyIDHasher --- src/wallet/scriptpubkeyman.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h index 93e1886102f..ef746387513 100644 --- a/src/wallet/scriptpubkeyman.h +++ b/src/wallet/scriptpubkeyman.h @@ -148,17 +148,6 @@ public: } }; -class KeyIDHasher -{ -public: - KeyIDHasher() {} - - size_t operator()(const CKeyID& id) const - { - return id.GetUint64(0); - } -}; - /* * A class implementing ScriptPubKeyMan manages some (or all) scriptPubKeys used in a wallet. * It contains the scripts and keys related to the scriptPubKeys it manages. From 4c69571e6eeae2c03d59045ea102baa5fd1c3816 Mon Sep 17 00:00:00 2001 From: Martin Zumsande Date: Sun, 22 Aug 2021 17:32:43 +0200 Subject: [PATCH 2/2] doc: remove outdated comment No longer relevant because Boost 1.46 is no longer supported and std::unordered_map is used instead of boost::unordered_map in CCoinsMap. --- src/util/hasher.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/util/hasher.h b/src/util/hasher.h index fa2fea30d82..9b79a1b5f15 100644 --- a/src/util/hasher.h +++ b/src/util/hasher.h @@ -33,10 +33,6 @@ public: SaltedOutpointHasher(); /** - * 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). - * * Having the hash noexcept allows libstdc++'s unordered_map to recalculate * the hash during rehash, so it does not have to cache the value. This * reduces node's memory by sizeof(size_t). The required recalculation has