aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-08-24 10:45:45 +0800
committerfanquake <fanquake@gmail.com>2021-08-24 11:12:15 +0800
commitb20ad0eb16b9142a246a4f64c4c81ce89d51d7f4 (patch)
tree0b07616aed64b5617da7c34bf04d15b0d1cc5f96
parent61a843e43bf113df7fa6062c84257c76ee40141f (diff)
parent4c69571e6eeae2c03d59045ea102baa5fd1c3816 (diff)
Merge bitcoin/bitcoin#22772: refactor: hasher cleanup (follow-up to 19935)
4c69571e6eeae2c03d59045ea102baa5fd1c3816 doc: remove outdated comment (Martin Zumsande) 16652a93ea6d25674fe318ef5e213e98427c8947 refactor: Remove unused KeyIDHasher (Martin Zumsande) Pull request description: Small follow-ups to #19935: - Removal of unused `KeyIDHasher` class ([comment in 19935](https://github.com/bitcoin/bitcoin/pull/19935#discussion_r544464524)) - Removal of an outdated comment, which referred to an old problem with the no longer supported Boost 1.46 and `boost::unordered_map`, now replaced by `std::unordered_map`. ([comment in 19935](https://github.com/bitcoin/bitcoin/pull/19935#discussion_r540911134)) ACKs for top commit: Saviour1001: Tested ACK <code>[4c69571](https://github.com/bitcoin/bitcoin/commit/4c69571e6eeae2c03d59045ea102baa5fd1c3816)</code> Zero-1729: ACK 4c69571e6eeae2c03d59045ea102baa5fd1c3816 theStack: ACK 4c69571e6eeae2c03d59045ea102baa5fd1c3816 🆗 Tree-SHA512: 243fda2120bfac6c40a268ca2c0f34482ce27e71fbc50005c0d13c2ad5db9ee72a037f9937c37cc50ed0f9f6f11ee6afee4ac50e5031d6876ec942f41f38dadf
-rw-r--r--src/util/hasher.h4
-rw-r--r--src/wallet/scriptpubkeyman.h11
2 files changed, 0 insertions, 15 deletions
diff --git a/src/util/hasher.h b/src/util/hasher.h
index fa2fea30d8..9b79a1b5f1 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
diff --git a/src/wallet/scriptpubkeyman.h b/src/wallet/scriptpubkeyman.h
index 93e1886102..ef74638751 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.