mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-10 19:43:13 +02:00
Make boost::multi_index comparators const
This fixes compatibility with boost 1.66
This commit is contained in:
@@ -71,7 +71,7 @@ struct modifiedentry_iter {
|
||||
// except operating on CTxMemPoolModifiedEntry.
|
||||
// TODO: refactor to avoid duplication of this logic.
|
||||
struct CompareModifiedEntry {
|
||||
bool operator()(const CTxMemPoolModifiedEntry &a, const CTxMemPoolModifiedEntry &b)
|
||||
bool operator()(const CTxMemPoolModifiedEntry &a, const CTxMemPoolModifiedEntry &b) const
|
||||
{
|
||||
double f1 = (double)a.nModFeesWithAncestors * b.nSizeWithAncestors;
|
||||
double f2 = (double)b.nModFeesWithAncestors * a.nSizeWithAncestors;
|
||||
@@ -86,7 +86,7 @@ struct CompareModifiedEntry {
|
||||
// This is sufficient to sort an ancestor package in an order that is valid
|
||||
// to appear in a block.
|
||||
struct CompareTxIterByAncestorCount {
|
||||
bool operator()(const CTxMemPool::txiter &a, const CTxMemPool::txiter &b)
|
||||
bool operator()(const CTxMemPool::txiter &a, const CTxMemPool::txiter &b) const
|
||||
{
|
||||
if (a->GetCountWithAncestors() != b->GetCountWithAncestors())
|
||||
return a->GetCountWithAncestors() < b->GetCountWithAncestors();
|
||||
|
Reference in New Issue
Block a user