-
Notifications
You must be signed in to change notification settings - Fork 708
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/execution/add_cautious_bassoon
- Loading branch information
Showing
52 changed files
with
459 additions
and
412 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// Copyright (c) 2021 MASSA LABS <[email protected]> | ||
|
||
#[cfg(not(test))] | ||
use massa_time::UTime; | ||
use massa_time::MassaTime; | ||
#[cfg(not(test))] | ||
use std::{io, net::SocketAddr}; | ||
#[cfg(not(test))] | ||
|
@@ -45,7 +45,7 @@ impl DefaultListener { | |
/// Initiates a connection with given timeout in millis | ||
#[cfg(not(test))] | ||
#[derive(Debug)] | ||
pub struct DefaultConnector(UTime); | ||
pub struct DefaultConnector(MassaTime); | ||
|
||
#[cfg(not(test))] | ||
impl DefaultConnector { | ||
|
@@ -86,7 +86,10 @@ impl DefaultEstablisher { | |
/// | ||
/// # Argument | ||
/// * timeout_duration: timeout duration in millis | ||
pub async fn get_connector(&mut self, timeout_duration: UTime) -> io::Result<DefaultConnector> { | ||
pub async fn get_connector( | ||
&mut self, | ||
timeout_duration: MassaTime, | ||
) -> io::Result<DefaultConnector> { | ||
Ok(DefaultConnector(timeout_duration)) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// Copyright (c) 2021 MASSA LABS <[email protected]> | ||
|
||
use massa_signature::PublicKey; | ||
use massa_time::UTime; | ||
use massa_time::MassaTime; | ||
use serde::Deserialize; | ||
use std::net::SocketAddr; | ||
|
||
|
@@ -35,23 +35,23 @@ pub struct BootstrapSettings { | |
/// Port to listen if we choose to allow other nodes to use us as bootstrap node. | ||
pub bind: Option<SocketAddr>, | ||
/// connection timeout | ||
pub connect_timeout: UTime, | ||
pub connect_timeout: MassaTime, | ||
/// readout timeout | ||
pub read_timeout: UTime, | ||
pub read_timeout: MassaTime, | ||
/// write timeout | ||
pub write_timeout: UTime, | ||
pub write_timeout: MassaTime, | ||
/// Time we wait before retrying a bootstrap | ||
pub retry_delay: UTime, | ||
pub retry_delay: MassaTime, | ||
/// Max ping delay. | ||
pub max_ping: UTime, | ||
pub max_ping: MassaTime, | ||
/// Enable clock synchronization | ||
pub enable_clock_synchronization: bool, | ||
/// Cache duration | ||
pub cache_duration: UTime, | ||
pub cache_duration: MassaTime, | ||
/// Max simultaneous bootstraps | ||
pub max_simultaneous_bootstraps: u32, | ||
/// Minimum interval between two bootstrap attempts from a given IP | ||
pub per_ip_min_interval: UTime, | ||
pub per_ip_min_interval: MassaTime, | ||
/// Max size of the IP list | ||
pub ip_list_max_size: usize, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// Copyright (c) 2021 MASSA LABS <[email protected]> | ||
|
||
use massa_time::UTime; | ||
use massa_time::MassaTime; | ||
use std::io; | ||
use std::net::SocketAddr; | ||
use tokio::io::DuplexStream; | ||
|
@@ -59,7 +59,7 @@ impl MockListener { | |
#[derive(Debug)] | ||
pub struct MockConnector { | ||
connection_connector_tx: mpsc::Sender<(Duplex, SocketAddr, oneshot::Sender<bool>)>, | ||
timeout_duration: UTime, | ||
timeout_duration: MassaTime, | ||
} | ||
|
||
impl MockConnector { | ||
|
@@ -117,7 +117,7 @@ impl MockEstablisher { | |
|
||
pub async fn get_connector( | ||
&mut self, | ||
timeout_duration: UTime, | ||
timeout_duration: MassaTime, | ||
) -> std::io::Result<MockConnector> { | ||
// create connector stream | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.