Skip to content

Commit 8cc9cfe

Browse files
committed
Switch CTxMempool::mapTx to use a hash index for txids
1 parent 382c871 commit 8cc9cfe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/txmempool.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#undef foreach
1818
#include "boost/multi_index_container.hpp"
1919
#include "boost/multi_index/ordered_index.hpp"
20+
#include "boost/multi_index/hashed_index.hpp"
2021

2122
class CAutoFile;
2223
class CBlockIndex;
@@ -422,7 +423,7 @@ class CTxMemPool
422423
CTxMemPoolEntry,
423424
boost::multi_index::indexed_by<
424425
// sorted by txid
425-
boost::multi_index::ordered_unique<mempoolentry_txid>,
426+
boost::multi_index::hashed_unique<mempoolentry_txid, SaltedTxidHasher>,
426427
// sorted by fee rate
427428
boost::multi_index::ordered_non_unique<
428429
boost::multi_index::tag<descendant_score>,

0 commit comments

Comments
 (0)