Skip to content

Commit e5c560e

Browse files
committed
f Don't number steps
1 parent 430ced3 commit e5c560e

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/lib.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@ impl Builder {
205205
let bdk_data_dir = format!("{}/bdk", config.storage_dir_path);
206206
fs::create_dir_all(bdk_data_dir.clone()).expect("Failed to create BDK data directory");
207207

208-
// Step 0: Initialize the Logger
208+
// Initialize the Logger
209209
let log_file_path = format!("{}/ldk_node.log", config.storage_dir_path);
210210
let logger = Arc::new(FilesystemLogger::new(log_file_path));
211211

212-
// Step 1: Initialize the on-chain wallet and chain access
212+
// Initialize the on-chain wallet and chain access
213213
let seed = io_utils::read_or_generate_seed_file(config.as_ref());
214214
let xprv = bitcoin::util::bip32::ExtendedPrivKey::new_master(config.network, &seed)
215215
.expect("Failed to read wallet master key");
@@ -243,10 +243,10 @@ impl Builder {
243243

244244
let wallet = Arc::new(Wallet::new(blockchain, bdk_wallet, Arc::clone(&logger)));
245245

246-
// Step 3: Initialize Persist
246+
// Initialize Persist
247247
let persister = Arc::new(FilesystemPersister::new(ldk_data_dir.clone()));
248248

249-
// Step 4: Initialize the ChainMonitor
249+
// Initialize the ChainMonitor
250250
let chain_monitor: Arc<ChainMonitor> = Arc::new(chainmonitor::ChainMonitor::new(
251251
Some(Arc::clone(&tx_sync)),
252252
Arc::clone(&wallet),
@@ -255,7 +255,7 @@ impl Builder {
255255
Arc::clone(&persister),
256256
));
257257

258-
// Step 5: Initialize the KeysManager
258+
// Initialize the KeysManager
259259
let cur_time = SystemTime::now()
260260
.duration_since(SystemTime::UNIX_EPOCH)
261261
.expect("System time error: Clock may have gone backwards");
@@ -266,7 +266,7 @@ impl Builder {
266266
Arc::clone(&wallet),
267267
));
268268

269-
// Step 12: Initialize the network graph, scorer, and router
269+
// Initialize the network graph, scorer, and router
270270
let network_graph = Arc::new(
271271
io_utils::read_network_graph(config.as_ref(), Arc::clone(&logger))
272272
.expect("Failed to read the network graph"),
@@ -284,12 +284,12 @@ impl Builder {
284284
Arc::clone(&scorer),
285285
));
286286

287-
// Step 6: Read ChannelMonitor state from disk
287+
// Read ChannelMonitor state from disk
288288
let mut channel_monitors = persister
289289
.read_channelmonitors(Arc::clone(&keys_manager), Arc::clone(&keys_manager))
290290
.expect("Failed to read channel monitors from disk");
291291

292-
// Step 7: Initialize the ChannelManager
292+
// Initialize the ChannelManager
293293
let mut user_config = UserConfig::default();
294294
user_config.channel_handshake_limits.force_announced_channel_preference = false;
295295
let channel_manager = {
@@ -341,20 +341,20 @@ impl Builder {
341341

342342
let channel_manager = Arc::new(channel_manager);
343343

344-
// Step 8: Give ChannelMonitors to ChainMonitor
344+
// Give ChannelMonitors to ChainMonitor
345345
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
}
349349

350-
// Step 10: Initialize the P2PGossipSync
350+
// Initialize the P2PGossipSync
351351
let gossip_sync = Arc::new(P2PGossipSync::new(
352352
Arc::clone(&network_graph),
353353
None::<Arc<dyn UtxoLookup + Send + Sync>>,
354354
Arc::clone(&logger),
355355
));
356356

357-
//// Step 11: Initialize the PeerManager
357+
// Initialize the PeerManager
358358
let onion_messenger: Arc<OnionMessenger> = Arc::new(OnionMessenger::new(
359359
Arc::clone(&keys_manager),
360360
Arc::clone(&keys_manager),
@@ -380,12 +380,12 @@ impl Builder {
380380
Arc::clone(&keys_manager),
381381
));
382382

383-
// Step 13: Init payment info storage
383+
// Init payment info storage
384384
// TODO: persist payment info to disk
385385
let inbound_payments = Arc::new(Mutex::new(HashMap::new()));
386386
let outbound_payments = Arc::new(Mutex::new(HashMap::new()));
387387

388-
// Step 14: Restore event handler from disk or create a new one.
388+
// Restore event handler from disk or create a new one.
389389
let event_queue = if let Ok(mut f) =
390390
fs::File::open(format!("{}/{}", ldk_data_dir, event::EVENTS_PERSISTENCE_KEY))
391391
{

0 commit comments

Comments
 (0)