-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify bootstrapping process #1699
Simplify bootstrapping process #1699
Conversation
e8bf334
to
76e464a
Compare
This seems simpler and it appears to work as expected: #1702 |
Most of the time yes, but it is not doing precisely what we need and nothing else. This PR does. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems working as expected. There are a couple of minor issues.
let mut bootstrap_command_state = bootstrap_command_state.lock().await; | ||
let bootstrap_command_receiver = match &mut *bootstrap_command_state { | ||
BootstrapCommandState::NotStarted => { | ||
error!("Bootstrap started."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error!("Bootstrap started."); | |
debug!("Bootstrap started."); |
@@ -246,14 +253,38 @@ where | |||
|
|||
/// Bootstraps Kademlia network | |||
async fn bootstrap(&mut self) { | |||
self.was_bootstrapped = true; | |||
let bootstrap_command_state = Arc::clone(&self.bootstrap_command_state); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let bootstrap_command_state = Arc::clone(&self.bootstrap_command_state); | |
let bootstrap_command_state = self.bootstrap_command_state.clone(); |
Code contributor checklist: