Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/2.5.0.0.7 rbf logic #5209

Merged
merged 7 commits into from
Sep 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: backport sort_by->sort_unstable_by for neighbor pruning
  • Loading branch information
kantai authored and wileyj committed Sep 19, 2024
commit 2f979c97248ec84d22cf82ef8f541c864773c74b
8 changes: 5 additions & 3 deletions stackslib/src/net/prune.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,11 @@ impl PeerNetwork {
match org_neighbors.get_mut(&org) {
None => {}
Some(ref mut neighbor_infos) => {
neighbor_infos.sort_by(|&(ref _nk1, ref stats1), &(ref _nk2, ref stats2)| {
PeerNetwork::compare_neighbor_uptime_health(stats1, stats2)
});
neighbor_infos.sort_unstable_by(
|&(ref _nk1, ref stats1), &(ref _nk2, ref stats2)| {
PeerNetwork::compare_neighbor_uptime_health(stats1, stats2)
},
);
}
}
}
Expand Down