fixed an incompatibility with modern compilers
(pulled from upstream changes)
This commit is contained in:
parent
d712d342a9
commit
c123b77419
1 changed files with 9 additions and 9 deletions
|
@ -155,7 +155,7 @@ struct update_descendant_state
|
||||||
modifySize(_modifySize), modifyFee(_modifyFee), modifyCount(_modifyCount)
|
modifySize(_modifySize), modifyFee(_modifyFee), modifyCount(_modifyCount)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void operator() (CTxMemPoolEntry &e)
|
void operator() (CTxMemPoolEntry &e) const
|
||||||
{ e.UpdateDescendantState(modifySize, modifyFee, modifyCount); }
|
{ e.UpdateDescendantState(modifySize, modifyFee, modifyCount); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -170,7 +170,7 @@ struct update_ancestor_state
|
||||||
modifySize(_modifySize), modifyFee(_modifyFee), modifyCount(_modifyCount), modifySigOps(_modifySigOps)
|
modifySize(_modifySize), modifyFee(_modifyFee), modifyCount(_modifyCount), modifySigOps(_modifySigOps)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void operator() (CTxMemPoolEntry &e)
|
void operator() (CTxMemPoolEntry &e) const
|
||||||
{ e.UpdateAncestorState(modifySize, modifyFee, modifyCount, modifySigOps); }
|
{ e.UpdateAncestorState(modifySize, modifyFee, modifyCount, modifySigOps); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -184,7 +184,7 @@ struct update_fee_delta
|
||||||
{
|
{
|
||||||
update_fee_delta(int64_t _feeDelta) : feeDelta(_feeDelta) { }
|
update_fee_delta(int64_t _feeDelta) : feeDelta(_feeDelta) { }
|
||||||
|
|
||||||
void operator() (CTxMemPoolEntry &e) { e.UpdateFeeDelta(feeDelta); }
|
void operator() (CTxMemPoolEntry &e) const { e.UpdateFeeDelta(feeDelta); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int64_t feeDelta;
|
int64_t feeDelta;
|
||||||
|
@ -194,7 +194,7 @@ struct update_lock_points
|
||||||
{
|
{
|
||||||
update_lock_points(const LockPoints& _lp) : lp(_lp) { }
|
update_lock_points(const LockPoints& _lp) : lp(_lp) { }
|
||||||
|
|
||||||
void operator() (CTxMemPoolEntry &e) { e.UpdateLockPoints(lp); }
|
void operator() (CTxMemPoolEntry &e) const { e.UpdateLockPoints(lp); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const LockPoints& lp;
|
const LockPoints& lp;
|
||||||
|
@ -217,7 +217,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);
|
||||||
|
@ -239,7 +239,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();
|
||||||
|
@ -254,7 +254,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();
|
||||||
|
@ -268,7 +268,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();
|
||||||
}
|
}
|
||||||
|
@ -277,7 +277,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…
Add table
Reference in a new issue