Merge pull request #1836 from lodgepole/feature/backport-11847
[backport] Fixes compatibility with boost 1.66
This commit is contained in:
commit
0ec5efb9f9
@ -73,7 +73,7 @@ struct modifiedentry_iter {
|
|||||||
// except operating on CTxMemPoolModifiedEntry.
|
// except operating on CTxMemPoolModifiedEntry.
|
||||||
// TODO: refactor to avoid duplication of this logic.
|
// TODO: refactor to avoid duplication of this logic.
|
||||||
struct CompareModifiedEntry {
|
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 f1 = (double)a.nModFeesWithAncestors * b.nSizeWithAncestors;
|
||||||
double f2 = (double)b.nModFeesWithAncestors * a.nSizeWithAncestors;
|
double f2 = (double)b.nModFeesWithAncestors * a.nSizeWithAncestors;
|
||||||
@ -88,7 +88,7 @@ struct CompareModifiedEntry {
|
|||||||
// This is sufficient to sort an ancestor package in an order that is valid
|
// This is sufficient to sort an ancestor package in an order that is valid
|
||||||
// to appear in a block.
|
// to appear in a block.
|
||||||
struct CompareTxIterByAncestorCount {
|
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())
|
if (a->GetCountWithAncestors() != b->GetCountWithAncestors())
|
||||||
return a->GetCountWithAncestors() < b->GetCountWithAncestors();
|
return a->GetCountWithAncestors() < b->GetCountWithAncestors();
|
||||||
|
@ -224,7 +224,7 @@ struct mempoolentry_txid
|
|||||||
class CompareTxMemPoolEntryByDescendantScore
|
class CompareTxMemPoolEntryByDescendantScore
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
|
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
|
||||||
{
|
{
|
||||||
bool fUseADescendants = UseDescendantScore(a);
|
bool fUseADescendants = UseDescendantScore(a);
|
||||||
bool fUseBDescendants = UseDescendantScore(b);
|
bool fUseBDescendants = UseDescendantScore(b);
|
||||||
@ -246,7 +246,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate which score to use for an entry (avoiding division).
|
// 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 f1 = (double)a.GetModifiedFee() * a.GetSizeWithDescendants();
|
||||||
double f2 = (double)a.GetModFeesWithDescendants() * a.GetTxSize();
|
double f2 = (double)a.GetModFeesWithDescendants() * a.GetTxSize();
|
||||||
@ -261,7 +261,7 @@ public:
|
|||||||
class CompareTxMemPoolEntryByScore
|
class CompareTxMemPoolEntryByScore
|
||||||
{
|
{
|
||||||
public:
|
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 f1 = (double)a.GetModifiedFee() * b.GetTxSize();
|
||||||
double f2 = (double)b.GetModifiedFee() * a.GetTxSize();
|
double f2 = (double)b.GetModifiedFee() * a.GetTxSize();
|
||||||
@ -275,7 +275,7 @@ public:
|
|||||||
class CompareTxMemPoolEntryByEntryTime
|
class CompareTxMemPoolEntryByEntryTime
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
|
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
|
||||||
{
|
{
|
||||||
return a.GetTime() < b.GetTime();
|
return a.GetTime() < b.GetTime();
|
||||||
}
|
}
|
||||||
@ -284,7 +284,7 @@ public:
|
|||||||
class CompareTxMemPoolEntryByAncestorFee
|
class CompareTxMemPoolEntryByAncestorFee
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
|
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
|
||||||
{
|
{
|
||||||
double aFees = a.GetModFeesWithAncestors();
|
double aFees = a.GetModFeesWithAncestors();
|
||||||
double aSize = a.GetSizeWithAncestors();
|
double aSize = a.GetSizeWithAncestors();
|
||||||
|
Loading…
Reference in New Issue
Block a user