pub trait SwarmExt: Swarm {
// Provided methods
fn liveness_check(&self, deadline: Instant) -> Result<()> { ... }
fn wait_for_connectivity(&self, deadline: Instant) -> Result<()> { ... }
fn fork_check(&self) -> Result<()> { ... }
fn wait_for_all_nodes_to_catchup_to_version(
&self,
version: u64,
deadline: Instant
) -> Result<()> { ... }
fn wait_for_all_nodes_to_catchup(&self, deadline: Instant) -> Result<()> { ... }
}
Provided Methods§
fn liveness_check(&self, deadline: Instant) -> Result<()>
sourcefn wait_for_connectivity(&self, deadline: Instant) -> Result<()>
fn wait_for_connectivity(&self, deadline: Instant) -> Result<()>
Waits for the swarm to achieve connectivity
sourcefn fork_check(&self) -> Result<()>
fn fork_check(&self) -> Result<()>
Perform a safety check, ensuring that no forks have occurred in the network.
sourcefn wait_for_all_nodes_to_catchup_to_version(
&self,
version: u64,
deadline: Instant
) -> Result<()>
fn wait_for_all_nodes_to_catchup_to_version( &self, version: u64, deadline: Instant ) -> Result<()>
Waits for all nodes to have caught up to the specified verison
.
sourcefn wait_for_all_nodes_to_catchup(&self, deadline: Instant) -> Result<()>
fn wait_for_all_nodes_to_catchup(&self, deadline: Instant) -> Result<()>
Wait for all nodes in the network to be caught up. This is done by first querying each node for its current version, selects the max version, then waits for all nodes to catch up to that version. Once done, we can guarantee that all transactions committed before invocation of this function are available at all the nodes in the swarm