instrumentation and network fixes

This commit is contained in:
John Smith
2022-10-04 20:09:32 -04:00
parent 7ed6b44d21
commit 98f90154f3
10 changed files with 62 additions and 37 deletions
+4 -1
View File
@@ -610,12 +610,15 @@ impl NetworkManager {
let c = self.config.get();
c.network.dht.min_peer_count as usize
};
// If none, then add the bootstrap nodes to it
if live_public_internet_entry_count == 0 {
self.unlocked_inner.bootstrap_task.tick().await?;
}
// If we still don't have enough peers, find nodes until we do
else if live_public_internet_entry_count < min_peer_count {
else if !self.unlocked_inner.bootstrap_task.is_running()
&& live_public_internet_entry_count < min_peer_count
{
self.unlocked_inner.peer_minimum_refresh_task.tick().await?;
}