From b6553c1ebc07812be6c842474a14dc30fe0f5446 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 1 Dec 2023 15:34:18 -0800 Subject: [PATCH] Fix preview test (#2795) --- src/subcommand/preview.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/subcommand/preview.rs b/src/subcommand/preview.rs index eea71af653..bd06d2c18b 100644 --- a/src/subcommand/preview.rs +++ b/src/subcommand/preview.rs @@ -42,6 +42,8 @@ impl Preview { fs::create_dir(&bitcoin_data_dir)?; + eprintln!("Spawning bitcoind…"); + let _bitcoind = KillOnDrop( Command::new("bitcoind") .arg({ @@ -49,9 +51,10 @@ impl Preview { arg.push(&bitcoin_data_dir); arg }) + .arg("-listen=0") + .arg("-printtoconsole=0") .arg("-regtest") .arg("-txindex") - .arg("-listen=0") .arg(format!("-rpcport={rpc_port}")) .spawn() .context("failed to spawn `bitcoind`")?, @@ -89,6 +92,8 @@ impl Preview { .get_new_address(None, Some(bitcoincore_rpc::json::AddressType::Bech32m))? .require_network(Network::Regtest)?; + eprintln!("Mining blocks…"); + rpc_client.generate_to_address(101, &address)?; if let Some(files) = self.files {