File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -241,15 +241,18 @@ class CompareTxMemPoolEntryByDescendantScore
241
241
242
242
/* * \class CompareTxMemPoolEntryByScore
243
243
*
244
- * Sort by score of entry ((fee+delta)/size) in descending order
244
+ * Sort by feerate of entry (fee/size) in descending order
245
+ * This is only used for transaction relay, so we use GetFee()
246
+ * instead of GetModifiedFee() to avoid leaking prioritization
247
+ * information via the sort order.
245
248
*/
246
249
class CompareTxMemPoolEntryByScore
247
250
{
248
251
public:
249
252
bool operator ()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
250
253
{
251
- double f1 = (double )a.GetModifiedFee () * b.GetTxSize ();
252
- double f2 = (double )b.GetModifiedFee () * a.GetTxSize ();
254
+ double f1 = (double )a.GetFee () * b.GetTxSize ();
255
+ double f2 = (double )b.GetFee () * a.GetTxSize ();
253
256
if (f1 == f2) {
254
257
return b.GetTx ().GetHash () < a.GetTx ().GetHash ();
255
258
}
You can’t perform that action at this time.
0 commit comments