Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ page. See [DEVELOPMENT_CYCLE.md](DEVELOPMENT_CYCLE.md) for more details.
- Routed compact filter (cbf) traffic through the configured SOCKS5 proxy
- Rejected `--proxy` on the `rpc` backend, and unsupported proxy options (`--proxy_auth`, `--timeout`) on the `rpc` and `cbf` backends, instead of silently ignoring them
- Fixed `compile` rejecting policies that are valid for the requested script type
- Fixed `warn!` messages, including the mainnet notice, being hidden unless `RUST_LOG` was set; warnings are now shown by default

## [4.0.0]

Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use clap::{CommandFactory, Parser};

#[tokio::main]
async fn main() {
env_logger::init();
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("warn")).init();
let cli_opts: CliOpts = CliOpts::parse();

let network = &cli_opts.network;
Expand Down
24 changes: 24 additions & 0 deletions tests/integration/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,30 @@ mod test_wallets {
.stderr(predicate::str::contains("No wallets configured yet."));
}

#[test]
fn test_mainnet_warning_shown_by_default() {
let temp_dir = TempDir::new().unwrap();
let cli = BdkCli::new("bitcoin", Some(temp_dir.path().to_path_buf()));

cli.cmd("wallets", &[])
.env_remove("RUST_LOG")
.assert()
.stderr(predicate::str::contains(
"not currently recommended for use on Bitcoin mainnet",
));
}

#[test]
fn test_mainnet_warning_hidden_with_rust_log_error() {
let temp_dir = TempDir::new().unwrap();
let cli = BdkCli::new("bitcoin", Some(temp_dir.path().to_path_buf()));

cli.cmd("wallets", &[])
.env("RUST_LOG", "error")
.assert()
.stderr(predicate::str::contains("not currently recommended").not());
}

#[cfg(feature = "rpc")]
#[test]
fn test_list_wallets_with_entries() {
Expand Down
Loading