Add tags to mempool's mapTx indices
This commit is contained in:
@@ -228,6 +228,11 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
// Multi_index tag names
|
||||
struct descendant_score {};
|
||||
struct entry_time {};
|
||||
struct mining_score {};
|
||||
|
||||
class CBlockPolicyEstimator;
|
||||
|
||||
/** An inpoint - a combination of a transaction and an index n into its vin */
|
||||
@@ -350,16 +355,19 @@ public:
|
||||
boost::multi_index::ordered_unique<mempoolentry_txid>,
|
||||
// sorted by fee rate
|
||||
boost::multi_index::ordered_non_unique<
|
||||
boost::multi_index::tag<descendant_score>,
|
||||
boost::multi_index::identity<CTxMemPoolEntry>,
|
||||
CompareTxMemPoolEntryByDescendantScore
|
||||
>,
|
||||
// sorted by entry time
|
||||
boost::multi_index::ordered_non_unique<
|
||||
boost::multi_index::tag<entry_time>,
|
||||
boost::multi_index::identity<CTxMemPoolEntry>,
|
||||
CompareTxMemPoolEntryByEntryTime
|
||||
>,
|
||||
// sorted by score (for mining prioritization)
|
||||
boost::multi_index::ordered_unique<
|
||||
boost::multi_index::tag<mining_score>,
|
||||
boost::multi_index::identity<CTxMemPoolEntry>,
|
||||
CompareTxMemPoolEntryByScore
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user