Skip to content

Commit 1f170db

Browse files
authored
Merge pull request #1182 from TheBlueMatt/2021-11-fix-txid-log
Trivial Logging Fixes
2 parents 293e5f2 + dea1310 commit 1f170db

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2355,7 +2355,8 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
23552355
let prevout = &tx.input[0].previous_output;
23562356
if prevout.txid == self.funding_info.0.txid && prevout.vout == self.funding_info.0.index as u32 {
23572357
let mut balance_spendable_csv = None;
2358-
log_info!(logger, "Channel closed by funding output spend in txid {}.", log_bytes!(tx.txid()));
2358+
log_info!(logger, "Channel {} closed by funding output spend in txid {}.",
2359+
log_bytes!(self.funding_info.0.to_channel_id()), tx.txid());
23592360
if (tx.input[0].sequence >> 8*3) as u8 == 0x80 && (tx.lock_time >> 8*3) as u8 == 0x20 {
23602361
let (mut new_outpoints, new_outputs) = self.check_spend_counterparty_transaction(&tx, height, &logger);
23612362
if !new_outputs.1.is_empty() {

lightning/src/ln/channelmanager.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5874,6 +5874,7 @@ impl<'a, Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref>
58745874
reason: ClosureReason::OutdatedChannelManager
58755875
});
58765876
} else {
5877+
log_info!(args.logger, "Successfully loaded channel {}", log_bytes!(channel.channel_id()));
58775878
if let Some(short_channel_id) = channel.get_short_channel_id() {
58785879
short_to_id.insert(short_channel_id, channel.channel_id());
58795880
}
@@ -5891,6 +5892,7 @@ impl<'a, Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref>
58915892

58925893
for (ref funding_txo, ref mut monitor) in args.channel_monitors.iter_mut() {
58935894
if !funding_txo_set.contains(funding_txo) {
5895+
log_info!(args.logger, "Broadcasting latest holder commitment transaction for closed channel {}", log_bytes!(funding_txo.to_channel_id()));
58945896
monitor.broadcast_latest_holder_commitment_txn(&args.tx_broadcaster, &args.logger);
58955897
}
58965898
}

0 commit comments

Comments
 (0)