Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fc5cccb

Browse files
committed
Fix consts in txmempool
1 parent c4d8e9e commit fc5cccb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/txmempool.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ struct mempoolentry_txid
227227
class CompareTxMemPoolEntryByDescendantScore
228228
{
229229
public:
230-
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
230+
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
231231
{
232232
bool fUseADescendants = UseDescendantScore(a);
233233
bool fUseBDescendants = UseDescendantScore(b);
@@ -249,7 +249,7 @@ class CompareTxMemPoolEntryByDescendantScore
249249
}
250250

251251
// Calculate which score to use for an entry (avoiding division).
252-
bool UseDescendantScore(const CTxMemPoolEntry &a)
252+
bool UseDescendantScore(const CTxMemPoolEntry &a) const
253253
{
254254
double f1 = (double)a.GetModifiedFee() * a.GetSizeWithDescendants();
255255
double f2 = (double)a.GetModFeesWithDescendants() * a.GetTxSize();
@@ -264,7 +264,7 @@ class CompareTxMemPoolEntryByDescendantScore
264264
class CompareTxMemPoolEntryByScore
265265
{
266266
public:
267-
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
267+
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
268268
{
269269
double f1 = (double)a.GetModifiedFee() * b.GetTxSize();
270270
double f2 = (double)b.GetModifiedFee() * a.GetTxSize();
@@ -278,7 +278,7 @@ class CompareTxMemPoolEntryByScore
278278
class CompareTxMemPoolEntryByEntryTime
279279
{
280280
public:
281-
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
281+
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
282282
{
283283
return a.GetTime() < b.GetTime();
284284
}
@@ -287,7 +287,7 @@ class CompareTxMemPoolEntryByEntryTime
287287
class CompareTxMemPoolEntryByAncestorFee
288288
{
289289
public:
290-
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
290+
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
291291
{
292292
double aFees = a.GetModFeesWithAncestors();
293293
double aSize = a.GetSizeWithAncestors();

0 commit comments

Comments
 (0)