\class CompareTxMemPoolEntryByScore * * Sort by feerate of entry (fee/size) in descending order * This is only used for transaction relay, so we use GetFee() * instead of GetModifiedFee() to avoid leaking prioritization * information via the sort order. */
| 254 | * information via the sort order. |
| 255 | */ |
| 256 | class CompareTxMemPoolEntryByScore |
| 257 | { |
| 258 | public: |
| 259 | bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const |
| 260 | { |
| 261 | double f1 = (double)a.GetFee() * b.GetTxSize(); |
| 262 | double f2 = (double)b.GetFee() * a.GetTxSize(); |
| 263 | if (f1 == f2) { |
| 264 | return b.GetTx().GetHash() < a.GetTx().GetHash(); |
| 265 | } |
| 266 | return f1 > f2; |
| 267 | } |
| 268 | }; |
| 269 | |
| 270 | class CompareTxMemPoolEntryByEntryTime |
| 271 | { |
no outgoing calls
no test coverage detected