Skip to content

Commit

Permalink
wollet: tests: use waterfalls to broadcast
Browse files Browse the repository at this point in the history
Co-authored-by: Riccardo Casatta <[email protected]>
  • Loading branch information
LeoComandini and RCasatta committed Nov 11, 2024
1 parent 8373b81 commit a2246b5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion lwk_wollet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ tokio = { version = "1.36.0", features = ["rt", "macros", "rt-multi-thread"] }
waterfalls = { version = "0.4.2", default-features = false, features = [
"test_env",
] }
bitcoind = { version = "0.36" } # TODO: remove once we're able to broadcast through waterfalls

[features]
default = ["esplora", "electrum", "elements_rpc"]
Expand Down
21 changes: 1 addition & 20 deletions lwk_wollet/tests/e2e.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1657,26 +1657,7 @@ fn test_waterfalls_esplora() {
let rt = tokio::runtime::Runtime::new().unwrap();
let exe = std::env::var("ELEMENTSD_EXEC").unwrap();

// Launch waterfalls with node otherwise it attempt to broadcast to the esplora testnet
// instance.
// TODO: remove bitcoind test dep
// let test_env = rt.block_on(waterfalls::test_env::launch(exe));
let mut conf = bitcoind::Conf::default();
let args = vec![
"-fallbackfee=0.0001",
"-dustrelayfee=0.00000001",
"-chain=liquidregtest",
"-initialfreecoins=2100000000",
"-validatepegin=0",
"-txindex=1",
"-rest=1",
];
conf.args = args;
conf.view_stdout = std::env::var("RUST_LOG").is_ok();
conf.network = "liquidregtest";

let elementsd = bitcoind::BitcoinD::with_conf(exe, &conf).unwrap();
let test_env = rt.block_on(waterfalls::test_env::launch_with_node(elementsd));
let test_env = rt.block_on(waterfalls::test_env::launch(exe));

let url = format!("{}/blocks/tip/hash", test_env.base_url());
let _r = reqwest::blocking::get(url).unwrap().text().unwrap();
Expand Down

0 comments on commit a2246b5

Please sign in to comment.