mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-22 19:08:53 +00:00
Merge pull request #9223
36ee12b
get_block_template_backlog: better sorting logic (SChernykh)
This commit is contained in:
commit
5eb3fc29bb
@ -1075,7 +1075,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…
Reference in New Issue
Block a user