aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.h
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2017-12-07 09:57:53 -0500
committerSuhas Daftuar <sdaftuar@gmail.com>2017-12-07 10:06:38 -0500
commit1ec0c0a01c316146434642ab2f14a7367306dbec (patch)
tree78f46d62f63666c09b7ffc6bc6717e699ee27636 /src/txmempool.h
parent7630a1fe9a4c9a38b47fe385afb8d8a1902870d6 (diff)
downloadbitcoin-1ec0c0a01c316146434642ab2f14a7367306dbec.tar.xz
Make boost::multi_index comparators const
This fixes compatibility with boost 1.66
Diffstat (limited to 'src/txmempool.h')
-rw-r--r--src/txmempool.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/txmempool.h b/src/txmempool.h
index 346585ab11..86a008d7b2 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -204,7 +204,7 @@ struct mempoolentry_txid
class CompareTxMemPoolEntryByDescendantScore
{
public:
- bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
+ bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
{
bool fUseADescendants = UseDescendantScore(a);
bool fUseBDescendants = UseDescendantScore(b);
@@ -226,7 +226,7 @@ public:
}
// Calculate which score to use for an entry (avoiding division).
- bool UseDescendantScore(const CTxMemPoolEntry &a)
+ bool UseDescendantScore(const CTxMemPoolEntry &a) const
{
double f1 = (double)a.GetModifiedFee() * a.GetSizeWithDescendants();
double f2 = (double)a.GetModFeesWithDescendants() * a.GetTxSize();
@@ -241,7 +241,7 @@ public:
class CompareTxMemPoolEntryByScore
{
public:
- bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
+ bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
{
double f1 = (double)a.GetModifiedFee() * b.GetTxSize();
double f2 = (double)b.GetModifiedFee() * a.GetTxSize();
@@ -255,7 +255,7 @@ public:
class CompareTxMemPoolEntryByEntryTime
{
public:
- bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
+ bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
{
return a.GetTime() < b.GetTime();
}
@@ -264,7 +264,7 @@ public:
class CompareTxMemPoolEntryByAncestorFee
{
public:
- bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
+ bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
{
double aFees = a.GetModFeesWithAncestors();
double aSize = a.GetSizeWithAncestors();