aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.h
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@chaincode.com>2016-02-16 12:10:12 -0500
committerSuhas Daftuar <sdaftuar@chaincode.com>2016-02-16 12:35:16 -0500
commit086da92ea772b70d460993ada0e068d139beddd6 (patch)
tree0af4c85989c7772978ce4b7a1d4e27865685767d /src/txmempool.h
parent8b70a64d62c6e64288762d062414cc979f880c54 (diff)
Add tags to mempool's mapTx indices
Diffstat (limited to 'src/txmempool.h')
-rw-r--r--src/txmempool.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/txmempool.h b/src/txmempool.h
index 386cb26d25..7a2a1ef432 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -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
>