|
|
@ -204,7 +204,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); |
|
|
@ -226,7 +226,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(); |
|
|
@ -241,7 +241,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(); |
|
|
@ -255,7 +255,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(); |
|
|
|
} |
|
|
|
} |
|
|
@ -264,7 +264,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(); |
|
|
|