@@ -226,7 +226,7 @@ struct mempoolentry_txid
226226class CompareTxMemPoolEntryByDescendantScore
227227{
228228public:
229- bool operator ()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
229+ bool operator ()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
230230 {
231231 bool fUseADescendants = UseDescendantScore (a);
232232 bool fUseBDescendants = UseDescendantScore (b);
@@ -248,7 +248,7 @@ class CompareTxMemPoolEntryByDescendantScore
248248 }
249249
250250 // Calculate which score to use for an entry (avoiding division).
251- bool UseDescendantScore (const CTxMemPoolEntry &a)
251+ bool UseDescendantScore (const CTxMemPoolEntry &a) const
252252 {
253253 double f1 = (double )a.GetModifiedFee () * a.GetSizeWithDescendants ();
254254 double f2 = (double )a.GetModFeesWithDescendants () * a.GetTxSize ();
@@ -263,7 +263,7 @@ class CompareTxMemPoolEntryByDescendantScore
263263class CompareTxMemPoolEntryByScore
264264{
265265public:
266- bool operator ()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
266+ bool operator ()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
267267 {
268268 double f1 = (double )a.GetModifiedFee () * b.GetTxSize ();
269269 double f2 = (double )b.GetModifiedFee () * a.GetTxSize ();
@@ -277,7 +277,7 @@ class CompareTxMemPoolEntryByScore
277277class CompareTxMemPoolEntryByEntryTime
278278{
279279public:
280- bool operator ()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
280+ bool operator ()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
281281 {
282282 return a.GetTime () < b.GetTime ();
283283 }
@@ -286,7 +286,7 @@ class CompareTxMemPoolEntryByEntryTime
286286class CompareTxMemPoolEntryByAncestorFee
287287{
288288public:
289- bool operator ()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
289+ bool operator ()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
290290 {
291291 double aFees = a.GetModFeesWithAncestors ();
292292 double aSize = a.GetSizeWithAncestors ();
0 commit comments