mempool: use FeeFrac for calculating regular score
This commit is contained in:
1 parent
3322b3a059
commit
922adf66ac
1 file changed
+3
-3
+3
-3
@@ -126,9 +126,9 @@ class CompareTxMemPoolEntryByScore
|
|||||||
public:
|
public:
|
||||||
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
|
bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
|
||||||
{
|
{
|
||||||
double f1 = (double)a.GetFee() * b.GetTxSize();
|
FeeFrac f1(a.GetFee(), a.GetTxSize());
|
||||||
double f2 = (double)b.GetFee() * a.GetTxSize();
|
FeeFrac f2(b.GetFee(), b.GetTxSize());
|
||||||
if (f1 == f2) {
|
if (FeeRateCompare(f1, f2) == 0) {
|
||||||
return b.GetTx().GetHash() < a.GetTx().GetHash();
|
return b.GetTx().GetHash() < a.GetTx().GetHash();
|
||||||
}
|
}
|
||||||
return f1 > f2;
|
return f1 > f2;
|
||||||
|
|||||||
Reference in new issue
Block a user