diff --git a/crates/chain/Cargo.toml b/crates/chain/Cargo.toml index baa6c2741..455155b11 100644 --- a/crates/chain/Cargo.toml +++ b/crates/chain/Cargo.toml @@ -25,7 +25,7 @@ miniscript = { version = "12.0.0", optional = true, default-features = false } rusqlite = { version = "0.31.0", features = ["bundled"], optional = true } [dev-dependencies] -rand = "0.8" +rand = "0.9" proptest = "1.2.0" bdk_testenv = { path = "../testenv", default-features = false } criterion = { version = "0.2" } diff --git a/crates/wallet/Cargo.toml b/crates/wallet/Cargo.toml index cc24f2c9f..9fa0a200a 100644 --- a/crates/wallet/Cargo.toml +++ b/crates/wallet/Cargo.toml @@ -16,7 +16,7 @@ rust-version = "1.63" workspace = true [dependencies] -rand_core = { version = "0.6.0" } +rand_core = { version = "0.9.0" } miniscript = { version = "12.0.0", features = [ "serde" ], default-features = false } bitcoin = { version = "0.32.4", features = [ "serde", "base64" ], default-features = false } serde = { version = "^1.0", features = ["derive"] } @@ -45,7 +45,7 @@ bdk_chain = { version = "0.21.1", features = ["rusqlite"] } bdk_wallet = { path = ".", features = ["rusqlite", "file_store", "test-utils"] } bdk_file_store = { version = "0.18.1" } anyhow = "1" -rand = "^0.8" +rand = "^0.9" [package.metadata.docs.rs] all-features = true diff --git a/example-crates/example_cli/Cargo.toml b/example-crates/example_cli/Cargo.toml index 290908a6a..f42a6b43c 100644 --- a/example-crates/example_cli/Cargo.toml +++ b/example-crates/example_cli/Cargo.toml @@ -13,6 +13,6 @@ bitcoin = { version = "0.32.0", features = ["base64"], default-features = false anyhow = "1" clap = { version = "4.5.17", features = ["derive", "env"] } -rand = "0.8" +rand = "0.9" serde = { version = "1", features = ["derive"] } serde_json = "1.0" diff --git a/example-crates/example_cli/src/lib.rs b/example-crates/example_cli/src/lib.rs index 3a700db3a..dabcdb69e 100644 --- a/example-crates/example_cli/src/lib.rs +++ b/example-crates/example_cli/src/lib.rs @@ -279,7 +279,7 @@ where CoinSelectionAlgo::NewestFirst => { plan_utxos.sort_by_key(|(_, utxo)| cmp::Reverse(utxo.chain_position)) } - CoinSelectionAlgo::BranchAndBound => plan_utxos.shuffle(&mut thread_rng()), + CoinSelectionAlgo::BranchAndBound => plan_utxos.shuffle(&mut rand::rng()), } // build candidate set @@ -375,7 +375,7 @@ where indexer: changeset, index: change_index, }); - outputs.shuffle(&mut thread_rng()); + outputs.shuffle(&mut rand::rng()); } let unsigned_tx = Transaction { @@ -878,7 +878,7 @@ where fn generate_bip86_helper(network: impl Into) -> anyhow::Result<()> { let secp = Secp256k1::new(); let mut seed = [0x00; 32]; - thread_rng().fill_bytes(&mut seed); + rand::rng().fill_bytes(&mut seed); let m = bip32::Xpriv::new_master(network, &seed)?; let fp = m.fingerprint(&secp);