From dd1754c0af050f408f1cb15b754903219d4cfec5 Mon Sep 17 00:00:00 2001 From: Jose Storopoli Date: Sun, 4 Feb 2024 16:37:57 -0300 Subject: [PATCH] fix: set higher bitcoind rpc threads and workerqueue --- crates/bitcoind_rpc/tests/test_emitter.rs | 8 +++++++- crates/esplora/tests/async_ext.rs | 2 ++ crates/esplora/tests/blocking_ext.rs | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/crates/bitcoind_rpc/tests/test_emitter.rs b/crates/bitcoind_rpc/tests/test_emitter.rs index 19bab6632..fcbbcf275 100644 --- a/crates/bitcoind_rpc/tests/test_emitter.rs +++ b/crates/bitcoind_rpc/tests/test_emitter.rs @@ -27,7 +27,13 @@ struct TestEnv { impl TestEnv { fn new() -> anyhow::Result { let daemon = match std::env::var_os("BITCOIND_EXEC") { - Some(bitcoind_path) => bitcoind::BitcoinD::new(bitcoind_path), + Some(bitcoind_path) => { + let mut bitcoind_conf = bitcoind::Conf::default(); + bitcoind_conf.p2p = bitcoind::P2P::Yes; + bitcoind_conf.args.push("-rpcworkqueue=1024"); + bitcoind_conf.args.push("-rpcthreads=64"); + bitcoind::BitcoinD::with_conf(bitcoind_path, &bitcoind_conf) + }, None => panic!("Cannot find bitcoind daemon, set BITCOIND_EXEC environment variable with the path to bitcoind"), }?; let client = bitcoincore_rpc::Client::new( diff --git a/crates/esplora/tests/async_ext.rs b/crates/esplora/tests/async_ext.rs index d6f7b6797..d2d3ac5ef 100644 --- a/crates/esplora/tests/async_ext.rs +++ b/crates/esplora/tests/async_ext.rs @@ -24,6 +24,8 @@ impl TestEnv { bitcoind::exe_path().expect("Cannot find bitcoind daemon, set BITCOIND_EXEC environment variable with the path to bitcoind"); let mut bitcoind_conf = bitcoind::Conf::default(); bitcoind_conf.p2p = bitcoind::P2P::Yes; + bitcoind_conf.args.push("-rpcworkqueue=1024"); + bitcoind_conf.args.push("-rpcthreads=64"); let bitcoind = BitcoinD::with_conf(bitcoind_exe, &bitcoind_conf)?; let mut electrs_conf = Conf::default(); diff --git a/crates/esplora/tests/blocking_ext.rs b/crates/esplora/tests/blocking_ext.rs index 12d1db0b3..48e6afa07 100644 --- a/crates/esplora/tests/blocking_ext.rs +++ b/crates/esplora/tests/blocking_ext.rs @@ -40,6 +40,8 @@ impl TestEnv { bitcoind::exe_path().expect("Cannot find bitcoind daemon, set BITCOIND_EXEC environment variable with the path to bitcoind"); let mut bitcoind_conf = bitcoind::Conf::default(); bitcoind_conf.p2p = bitcoind::P2P::Yes; + bitcoind_conf.args.push("-rpcworkqueue=1024"); + bitcoind_conf.args.push("-rpcthreads=64"); let bitcoind = BitcoinD::with_conf(bitcoind_exe, &bitcoind_conf)?; let mut electrs_conf = Conf::default();