We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3fe836 commit 7230187Copy full SHA for 7230187
src/txmempool.h
@@ -587,4 +587,17 @@ class CCoinsViewMemPool : public CCoinsViewBacked
587
bool HaveCoins(const uint256 &txid) const;
588
};
589
590
+// We want to sort transactions by coin age priority
591
+typedef std::pair<double, CTxMemPool::txiter> TxCoinAgePriority;
592
+
593
+struct TxCoinAgePriorityCompare
594
+{
595
+ bool operator()(const TxCoinAgePriority& a, const TxCoinAgePriority& b)
596
+ {
597
+ if (a.first == b.first)
598
+ return CompareTxMemPoolEntryByScore()(*(b.second), *(a.second)); //Reverse order to make sort less than
599
+ return a.first < b.first;
600
+ }
601
+};
602
603
#endif // BITCOIN_TXMEMPOOL_H
0 commit comments