Skip to content

Commit

Permalink
Merge pull request #2057 from maqi/responsible_range
Browse files Browse the repository at this point in the history
chore(node): log setting responsible range
  • Loading branch information
maqi authored Aug 22, 2024
2 parents a0f85d1 + 83157f9 commit d572093
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sn_networking/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -792,12 +792,11 @@ impl SwarmDriver {
let closest_k_peers = self.get_closest_k_value_local_peers();

if let Some(distance) = self.get_farthest_data_address_estimate(&closest_k_peers) {
info!("Set responsible range to {distance}");
// set any new distance to farthest record in the store
self.swarm.behaviour_mut().kademlia.store_mut().set_distance_range(distance);

let replication_distance = self.swarm.behaviour_mut().kademlia.store_mut().get_farthest_replication_distance_bucket().unwrap_or(1);
// the distance range within the replication_fetcher shall be in sync as well
self.replication_fetcher.set_replication_distance_range(replication_distance);
self.replication_fetcher.set_replication_distance_range(distance);
}
}
}
Expand Down

0 comments on commit d572093

Please sign in to comment.