Skip to content

Commit

Permalink
fix: unnecessary async
Browse files Browse the repository at this point in the history
  • Loading branch information
mickvandijke committed Jan 21, 2025
1 parent 4223902 commit cd0cfbe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ant-node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl RunningNode {
}

/// Shutdown the SwarmDriver loop and the node (NetworkEvents) loop.
pub async fn shutdown(self) {
pub fn shutdown(self) {
// Send the shutdown signal to the swarm driver and node loop
let _ = self.shutdown_sender.send(true);
}
Expand Down
8 changes: 4 additions & 4 deletions ant-node/src/spawn/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ impl RunningNetwork {
}

/// Shutdown all running nodes.
pub async fn shutdown(self) {
pub fn shutdown(self) {
for node in self.running_nodes.into_iter() {
node.shutdown().await;
node.shutdown();
}
}
}
Expand Down Expand Up @@ -211,7 +211,7 @@ mod tests {
use std::time::Duration;
use tokio::time::sleep;

#[tokio::test]
#[tokio::test(flavor = "multi_thread")]
async fn test_spawn_network() {
// start local Ethereum node
let evm_testnet = EvmTestnet::new().await;
Expand Down Expand Up @@ -251,6 +251,6 @@ mod tests {
// TODO: nodes do not know each other..
}

running_network.shutdown().await;
running_network.shutdown();
}
}
2 changes: 1 addition & 1 deletion ant-node/src/spawn/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,6 @@ mod tests {

assert!(!listen_addrs.is_empty());

running_node.shutdown().await;
running_node.shutdown();
}
}

0 comments on commit cd0cfbe

Please sign in to comment.