aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/txmempool.h')
-rw-r--r--src/txmempool.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/txmempool.h b/src/txmempool.h
index 52f186f0ff..d0cb41a078 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -329,9 +329,7 @@ public:
static const int ROLLING_FEE_HALFLIFE = 60 * 60 * 12; // public only for testing
- typedef boost::multi_index_container<
- CTxMemPoolEntry,
- boost::multi_index::indexed_by<
+ struct CTxMemPoolEntry_Indices final : boost::multi_index::indexed_by<
// sorted by txid
boost::multi_index::hashed_unique<mempoolentry_txid, SaltedTxidHasher>,
// sorted by wtxid
@@ -359,6 +357,10 @@ public:
CompareTxMemPoolEntryByAncestorFee
>
>
+ {};
+ typedef boost::multi_index_container<
+ CTxMemPoolEntry,
+ CTxMemPoolEntry_Indices
> indexed_transaction_set;
/**
@@ -366,9 +368,7 @@ public:
* that are guarded by it.
*
* @par Consistency guarantees
- *
* By design, it is guaranteed that:
- *
* 1. Locking both `cs_main` and `mempool.cs` will give a view of mempool
* that is consistent with current chain tip (`ActiveChain()` and
* `CoinsTip()`) and is fully populated. Fully populated means that if the
@@ -376,7 +376,6 @@ public:
* previously active chain, all the missing transactions will have been
* re-added to the mempool and should be present if they meet size and
* consistency constraints.
- *
* 2. Locking `mempool.cs` without `cs_main` will give a view of a mempool
* consistent with some chain that was active since `cs_main` was last
* locked, and that is fully populated as described above. It is ok for