Ensure current channel state is logged for all channels on startup 2021-11-fix-txid-log
authorMatt Corallo <git@bluematt.me>
Sat, 20 Nov 2021 22:49:11 +0000 (22:49 +0000)
committerMatt Corallo <git@bluematt.me>
Sat, 20 Nov 2021 23:16:28 +0000 (23:16 +0000)
lightning/src/ln/channelmanager.rs

index 1e60dcdccd401538cf4b2210b030024818e2ef17..ee427b06c2760ea1697428a5d8e2254c2fd60af0 100644 (file)
@@ -5874,6 +5874,7 @@ impl<'a, Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref>
                                                reason: ClosureReason::OutdatedChannelManager
                                        });
                                } else {
+                                       log_info!(args.logger, "Successfully loaded channel {}", log_bytes!(channel.channel_id()));
                                        if let Some(short_channel_id) = channel.get_short_channel_id() {
                                                short_to_id.insert(short_channel_id, channel.channel_id());
                                        }
@@ -5891,6 +5892,7 @@ impl<'a, Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref>
 
                for (ref funding_txo, ref mut monitor) in args.channel_monitors.iter_mut() {
                        if !funding_txo_set.contains(funding_txo) {
+                               log_info!(args.logger, "Broadcasting latest holder commitment transaction for closed channel {}", log_bytes!(funding_txo.to_channel_id()));
                                monitor.broadcast_latest_holder_commitment_txn(&args.tx_broadcaster, &args.logger);
                        }
                }