diff options
author | luigi1111 <luigi1111w@gmail.com> | 2024-03-08 13:45:41 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2024-03-08 13:45:41 -0500 |
commit | d6d55b507a7d3898ce2a17787423a5eec28d7916 (patch) | |
tree | 2e78d451d12081f5d23489266ebf7ee91f61656b | |
parent | Merge pull request #9218 (diff) | |
parent | get_block_template_backlog: better sorting logic (diff) | |
download | monero-d6d55b507a7d3898ce2a17787423a5eec28d7916.tar.xz |
Merge pull request #9222
66e5081 get_block_template_backlog: better sorting logic (SChernykh)
-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 cd6b4bec5..f70db2b74 100644 --- a/src/cryptonote_core/tx_pool.cpp +++ b/src/cryptonote_core/tx_pool.cpp @@ -1074,7 +1074,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; |