Skip to content

Commit c4992bd

Browse files
authored
Merge pull request #704 from chuksys/replace-thread_rng-with-rng
Replace deprecated thread_rng with rng
2 parents 8cf64ec + ac948f6 commit c4992bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

benches/payments.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use crate::common::open_channel_push_amt;
2020

2121
fn spawn_payment(node_a: Arc<Node>, node_b: Arc<Node>, amount_msat: u64) {
2222
let mut preimage_bytes = [0u8; 32];
23-
rand::thread_rng().fill_bytes(&mut preimage_bytes);
23+
rand::rng().fill_bytes(&mut preimage_bytes);
2424
let preimage = PaymentPreimage(preimage_bytes);
2525
let payment_hash: PaymentHash = preimage.into();
2626

@@ -101,7 +101,7 @@ async fn send_payments(node_a: Arc<Node>, node_b: Arc<Node>) -> std::time::Durat
101101

102102
// Send back the money for the next iteration.
103103
let mut preimage_bytes = [0u8; 32];
104-
rand::thread_rng().fill_bytes(&mut preimage_bytes);
104+
rand::rng().fill_bytes(&mut preimage_bytes);
105105
node_b
106106
.spontaneous_payment()
107107
.send_with_preimage(

0 commit comments

Comments
 (0)