Skip to content

Commit da7e634

Browse files
committed
f Nits
1 parent 439e1df commit da7e634

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ use std::sync::atomic::{AtomicBool, Ordering};
8787
use std::sync::{Arc, Mutex, RwLock};
8888
use std::time::{Duration, Instant, SystemTime};
8989

90-
// The used 'stop gap' parameter used by BDK's wallet sync. This seems to configure the threshold
90+
// The 'stop gap' parameter used by BDK's wallet sync. This seems to configure the threshold
9191
// number of blocks after which BDK stops looking for scripts belonging to the wallet.
9292
const BDK_CLIENT_STOP_GAP: usize = 20;
9393

@@ -197,7 +197,7 @@ impl Builder {
197197
pub fn build(&self) -> Node {
198198
let config = Arc::new(self.config.clone());
199199

200-
let ldk_data_dir = format!("{}/ldk", &config.storage_dir_path.clone());
200+
let ldk_data_dir = format!("{}/ldk", &config.storage_dir_path);
201201
fs::create_dir_all(ldk_data_dir.clone()).expect("Failed to create LDK data directory");
202202

203203
let bdk_data_dir = format!("{}/bdk", config.storage_dir_path.clone());
@@ -342,7 +342,7 @@ impl Builder {
342342
let channel_manager = Arc::new(channel_manager);
343343

344344
// Step 8: Give ChannelMonitors to ChainMonitor
345-
for (_blockhash, channel_monitor) in channel_monitors.drain(..) {
345+
for (_blockhash, channel_monitor) in channel_monitors.into_iter() {
346346
let funding_outpoint = channel_monitor.get_funding_txo().0;
347347
chain_monitor.watch_channel(funding_outpoint, channel_monitor);
348348
}
@@ -361,7 +361,7 @@ impl Builder {
361361
Arc::clone(&logger),
362362
IgnoringMessageHandler {},
363363
));
364-
let ephemeral_bytes: [u8; 32] = rand::thread_rng().gen();
364+
let ephemeral_bytes: [u8; 32] = keys_manager.get_secure_random_bytes();
365365
let lightning_msg_handler = MessageHandler {
366366
chan_handler: Arc::clone(&channel_manager),
367367
route_handler: Arc::clone(&gossip_sync),

0 commit comments

Comments
 (0)