Skip to content

Commit

Permalink
refactor : #3263 Remove floating part from time display in bootstrap (#…
Browse files Browse the repository at this point in the history
…3265)

Co-authored-by: urvoy <l.urvoy@systel-sa.com>
  • Loading branch information
modship and urvoy authored Nov 28, 2022
1 parent a666eb9 commit b47923b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion massa-bootstrap/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ impl BootstrapServer {
let mut server = BootstrapServerBinder::new(dplx, self.keypair.clone(), self.bootstrap_config.max_bytes_read_write, self.bootstrap_config.max_bootstrap_message_size, self.bootstrap_config.thread_count, self.bootstrap_config.max_datastore_key_length, self.bootstrap_config.randomness_size_bytes, self.bootstrap_config.consensus_bootstrap_part_size);
let _ = match tokio::time::timeout(self.bootstrap_config.write_error_timeout.into(), server.send(BootstrapServerMessage::BootstrapError {
error:
format!("Your last bootstrap on this server was {:#?} ago and you have to wait {:#?} before retrying.", occ.get().elapsed(), per_ip_min_interval.saturating_sub(occ.get().elapsed()))
format!("Your last bootstrap on this server was {:#?} ago and you have to wait {:#?} before retrying.", occ.get().elapsed().as_secs(), per_ip_min_interval.saturating_sub(occ.get().elapsed()).as_secs())
})).await {
Err(_) => Err(std::io::Error::new(std::io::ErrorKind::TimedOut, "bootstrap error too early retry bootstrap send timed out").into()),
Ok(Err(e)) => Err(e),
Expand Down

0 comments on commit b47923b

Please sign in to comment.