Skip to content

Commit

Permalink
fix(testnet): sleep after launching faucet
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandSherwin authored and joshuef committed Dec 28, 2023
1 parent 9c363c7 commit c0c18f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion sn_faucet/src/faucet_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ use tracing::{debug, error, trace};
///
/// # balance should be updated
/// ```
pub async fn run_faucet_server(client: &Client) -> Result<()> {
let server =
Server::http("0.0.0.0:8000").map_err(|err| eyre!("Failed to start server: {err}"))?;
Expand Down
4 changes: 3 additions & 1 deletion sn_testnet/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ use std::{
io::ErrorKind,
path::PathBuf,
process::{Command, Stdio},
time::Duration,
};
use tracing::{debug, info};

Expand Down Expand Up @@ -211,8 +212,9 @@ async fn main() -> Result<()> {
faucet_bin_path.push(FAUCET_BIN_NAME);
}

info!("Launching CashNote faucet server");
info!("Launching CashNote faucet server and sleeping for 5 seconds");
run_faucet(gen_multi_addr, faucet_bin_path)?;
tokio::time::sleep(Duration::from_secs(5)).await;

println!("Testnet and faucet launched successfully");
Ok(())
Expand Down

0 comments on commit c0c18f8

Please sign in to comment.