diff options
author | luigi1111 <luigi1111w@gmail.com> | 2024-03-08 13:46:09 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2024-03-08 13:46:09 -0500 |
commit | 5eb3fc29bbeef95c133d18a34c52aecb9f449b60 (patch) | |
tree | 2bc7bb8b92ebf238952f98ea161ff235d63e2540 /src | |
parent | Merge pull request #9224 (diff) | |
parent | get_block_template_backlog: better sorting logic (diff) | |
download | monero-5eb3fc29bbeef95c133d18a34c52aecb9f449b60.tar.xz |
Merge pull request #9223
36ee12b get_block_template_backlog: better sorting logic (SChernykh)
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptonote_core/tx_pool.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp index 5f058b83d..1de36be8f 100644 --- a/src/cryptonote_core/tx_pool.cpp +++ b/src/cryptonote_core/tx_pool.cpp @@ -1075,7 +1075,7 @@ namespace cryptonote // If the total weight is too high, choose the best paying transactions 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(); uint64_t w = 0; |