Skip to content

Commit

Permalink
fix: set higher bitcoind rpc threads and workerqueue
Browse files Browse the repository at this point in the history
  • Loading branch information
storopoli committed Feb 5, 2024
1 parent 380da1b commit 0ceb17a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/bitcoind_rpc/tests/test_emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ struct TestEnv {
impl TestEnv {
fn new() -> anyhow::Result<Self> {
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(
Expand Down
2 changes: 2 additions & 0 deletions crates/esplora/tests/async_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions crates/esplora/tests/blocking_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 0ceb17a

Please sign in to comment.