Skip to content

Commit

Permalink
fix(network): update state once bootstrap node has been replaced
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandSherwin committed Jun 17, 2024
1 parent 1d993a7 commit d96cbbb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sn_networking/src/event/swarm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,12 +636,16 @@ impl SwarmDriver {
}
}
if let Some(to_be_removed_bootstrap) = shall_removed {
trace!("Bootstrap node {to_be_removed_bootstrap:?} to be replaced by peer {peer_id:?}");
let _entry = self
info!("Bootstrap node {to_be_removed_bootstrap:?} to be replaced by peer {peer_id:?}");
let entry = self
.swarm
.behaviour_mut()
.kademlia
.remove_peer(&to_be_removed_bootstrap);
if let Some(removed_peer) = entry {
self.update_on_peer_removal(*removed_peer.node.key.preimage());
let _ = self.check_for_change_in_our_close_group();
}
}
}

Expand Down

0 comments on commit d96cbbb

Please sign in to comment.