Skip to content

Commit

Permalink
Merge pull request #102 from Shourya742/feature/bitcoindCustomPath
Browse files Browse the repository at this point in the history
Added bitcoind binary on path bin/bitcoind for CI caching
  • Loading branch information
rajarshimaitra authored Mar 4, 2024
2 parents c92342b + 099827b commit b00c1fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Binary file added bin/bitcoind
Binary file not shown.
11 changes: 10 additions & 1 deletion src/test_framework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,16 @@ impl TestFramework {
conf.args.push("-txindex=1"); //txindex is must, or else wallet sync won't work.
conf.staticdir = Some(temp_dir.join(".bitcoin"));
log::info!("bitcoind configuration: {:?}", conf.args);
let bitcoind = BitcoinD::from_downloaded_with_conf(&conf).unwrap();

let key = "BITCOIND_EXE";
let curr_dir_path = std::env::current_dir().unwrap();
let bitcoind_path = curr_dir_path.join("bin").join("bitcoind");
std::env::set_var(key, bitcoind_path);
let exe_path = bitcoind::exe_path().unwrap();

log::info!("Executable path: {:?}", exe_path);

let bitcoind = BitcoinD::with_conf(exe_path, &conf).unwrap();

// Generate initial 101 blocks
let mining_address = bitcoind
Expand Down

0 comments on commit b00c1fc

Please sign in to comment.