Add tags to mempool's mapTx indices

This commit is contained in:
Suhas Daftuar
2016-02-16 12:10:12 -05:00
parent 8b70a64d62
commit 086da92ea7
4 changed files with 24 additions and 16 deletions

View File

@@ -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
>