aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.h
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2019-09-17 17:02:56 -0400
committerAndrew Chow <achow101-github@achow101.com>2020-11-10 14:33:37 -0500
commit95e61c1cf2a91d041c8025306ba36f0ea2806894 (patch)
tree225cae6060841c5049f9722b48776dd8901d4f59 /src/txmempool.h
parent42f950cb27b732782d55282cdcd934396fcd7071 (diff)
Move Hashers to util/hasher.{cpp/h}
Move the hashers that we use for hash tables to a common place. Moved hashers: - SaltedTxidHasher - SaltedOutpointHasher - FilterHeaderHasher - SignatureCacheHasher - BlockHasher
Diffstat (limited to 'src/txmempool.h')
-rw-r--r--src/txmempool.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/txmempool.h b/src/txmempool.h
index f513f14af6..e6ea09f869 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -15,13 +15,13 @@
#include <amount.h>
#include <coins.h>
-#include <crypto/siphash.h>
#include <indirectmap.h>
#include <optional.h>
#include <policy/feerate.h>
#include <primitives/transaction.h>
#include <sync.h>
#include <random.h>
+#include <util/hasher.h>
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/hashed_index.hpp>
@@ -398,20 +398,6 @@ enum class MemPoolRemovalReason {
REPLACED, //!< Removed for replacement
};
-class SaltedTxidHasher
-{
-private:
- /** Salt */
- const uint64_t k0, k1;
-
-public:
- SaltedTxidHasher();
-
- size_t operator()(const uint256& txid) const {
- return SipHashUint256(k0, k1, txid);
- }
-};
-
/**
* CTxMemPool stores valid-according-to-the-current-best-chain transactions
* that may be included in the next block.