aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/txmempool.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/txmempool.h b/src/txmempool.h
index d25d9c50bb..c6a1bf08ce 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -241,15 +241,18 @@ public:
/** \class CompareTxMemPoolEntryByScore
*
- * Sort by score of entry ((fee+delta)/size) in descending order
+ * Sort by feerate of entry (fee/size) in descending order
+ * This is only used for transaction relay, so we use GetFee()
+ * instead of GetModifiedFee() to avoid leaking prioritization
+ * information via the sort order.
*/
class CompareTxMemPoolEntryByScore
{
public:
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
{
- double f1 = (double)a.GetModifiedFee() * b.GetTxSize();
- double f2 = (double)b.GetModifiedFee() * a.GetTxSize();
+ double f1 = (double)a.GetFee() * b.GetTxSize();
+ double f2 = (double)b.GetFee() * a.GetTxSize();
if (f1 == f2) {
return b.GetTx().GetHash() < a.GetTx().GetHash();
}