Skip to content

Commit

Permalink
Switch CTxMempool::mapTx to use a hash index for txids
Browse files Browse the repository at this point in the history
  • Loading branch information
sipa authored and nuttycom committed Feb 11, 2021
1 parent ec4196d commit 407532d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/txmempool.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#undef foreach
#include "boost/multi_index_container.hpp"
#include "boost/multi_index/ordered_index.hpp"
#include "boost/multi_index/hashed_index.hpp"

class CAutoFile;

Expand Down Expand Up @@ -151,7 +152,7 @@ class CTxMemPool
CTxMemPoolEntry,
boost::multi_index::indexed_by<
// sorted by txid
boost::multi_index::ordered_unique<mempoolentry_txid>,
boost::multi_index::hashed_unique<mempoolentry_txid, SaltedTxidHasher>,
// sorted by fee rate
boost::multi_index::ordered_non_unique<
boost::multi_index::identity<CTxMemPoolEntry>,
Expand Down

0 comments on commit 407532d

Please sign in to comment.