mirror of
https://github.com/monero-project/monero.git
synced 2025-07-12 09:09:28 -04:00
Merge pull request #9222
66e5081
get_block_template_backlog: better sorting logic (SChernykh)
This commit is contained in:
commit
d6d55b507a
1 changed files with 1 additions and 1 deletions
|
@ -1074,7 +1074,7 @@ namespace cryptonote
|
||||||
|
|
||||||
// If the total weight is too high, choose the best paying transactions
|
// If the total weight is too high, choose the best paying transactions
|
||||||
if (total_weight > max_backlog_weight)
|
if (total_weight > max_backlog_weight)
|
||||||
std::sort(tmp.begin(), tmp.end(), [](const auto& a, const auto& b){ return a.fee * b.weight > b.fee * a.weight; });
|
std::stable_sort(tmp.begin(), tmp.end(), [](const auto& a, const auto& b){ return a.fee * b.weight > b.fee * a.weight; });
|
||||||
|
|
||||||
backlog.clear();
|
backlog.clear();
|
||||||
uint64_t w = 0;
|
uint64_t w = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue