diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-01-03 10:32:47 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-01-03 10:33:06 +0100 |
commit | cb7ef312ff34db20db4234ed5ea68378cf2e9559 (patch) | |
tree | f580d39db4d71172fba1a3b8b4732aec42741252 /src/miner.h | |
parent | 2559a19e6fdb91cd69b05ac3e8aed91c3be8882c (diff) | |
parent | ad8393634a7b86a1da40f4d2533b16b69c0dd26c (diff) | |
download | bitcoin-cb7ef312ff34db20db4234ed5ea68378cf2e9559.tar.xz |
Merge #12032: [backport] #11847 Make boost::multi_index comparators const
ad83936 Make boost::multi_index comparators const (Suhas Daftuar)
Pull request description:
Backports @sdaftuar's fix (#11847) for compatibility with boost 1.66 to the 0.15.x branch.
Fixes #12009
Tree-SHA512: 5d3f0a03c4fbee28e2b88204dc267d948b226512db8e4db0080002f2575d3f3793ada8572d817b7ca5a76b134c6b393691a7020334fb96d4f592661c0936673a
Diffstat (limited to 'src/miner.h')
-rw-r--r-- | src/miner.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/miner.h b/src/miner.h index f68f77c0ba..aa5fccf774 100644 --- a/src/miner.h +++ b/src/miner.h @@ -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(); |