Skip to content

Commit

Permalink
temporary: adjust chain_with_max_peer_count criteria
Browse files Browse the repository at this point in the history
  • Loading branch information
Tumas committed Oct 23, 2024
1 parent de10546 commit dd9e2f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion p2p/src/sync_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,8 @@ impl SyncManager {
fn chain_with_max_peer_count(&self) -> Option<ChainId> {
self.chains_with_peer_counts()
.into_iter()
.max_by_key(|(_, peer_count)| *peer_count)
// .max_by_key(|(_, peer_count)| *peer_count)
.max_by_key(|(chain_id, peer_count)| (chain_id.finalized_epoch, *peer_count))
.map(|(chain_id, _)| chain_id)
}

Expand Down

0 comments on commit dd9e2f3

Please sign in to comment.