Skip to content

Commit

Permalink
Merge pull request #2548 from maqi/not_carryout_bootstrap_replacement
Browse files Browse the repository at this point in the history
chore: no longer carryout out bootstrap node replacement
  • Loading branch information
jacderida authored Dec 17, 2024
2 parents 663bad8 + 0ec89a1 commit 21071bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ant-networking/src/event/swarm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,10 @@ impl SwarmDriver {
// If we are not local, we care only for peers that we dialed and thus are reachable.
if self.local || has_dialed {
// A bad node cannot establish a connection with us. So we can add it to the RT directly.
self.remove_bootstrap_from_full(peer_id);

// With the new bootstrap cache, the workload is distributed,
// hence no longer need to replace bootstrap nodes for workload share.
// self.remove_bootstrap_from_full(peer_id);

// Avoid have `direct link format` addrs co-exists with `relay` addr
if has_relayed {
Expand Down Expand Up @@ -624,6 +627,7 @@ impl SwarmDriver {
}

// if target bucket is full, remove a bootstrap node if presents.
#[allow(dead_code)]
fn remove_bootstrap_from_full(&mut self, peer_id: PeerId) {
let mut shall_removed = None;

Expand Down

0 comments on commit 21071bd

Please sign in to comment.