From 0b072834ab92081bba4ec907b39f1aa78953016c Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sat, 20 Nov 2021 22:27:10 +0000 Subject: [PATCH] Correct txid logging to reverse bytes. We also take this opportunity to log the channel being closed when one is closed by an on-chain spend of the funding output. --- lightning/src/chain/channelmonitor.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lightning/src/chain/channelmonitor.rs b/lightning/src/chain/channelmonitor.rs index 425a1890a..d5664e453 100644 --- a/lightning/src/chain/channelmonitor.rs +++ b/lightning/src/chain/channelmonitor.rs @@ -2355,7 +2355,8 @@ impl ChannelMonitorImpl { let prevout = &tx.input[0].previous_output; if prevout.txid == self.funding_info.0.txid && prevout.vout == self.funding_info.0.index as u32 { let mut balance_spendable_csv = None; - log_info!(logger, "Channel closed by funding output spend in txid {}.", log_bytes!(tx.txid())); + log_info!(logger, "Channel {} closed by funding output spend in txid {}.", + log_bytes!(self.funding_info.0.to_channel_id()), tx.txid()); if (tx.input[0].sequence >> 8*3) as u8 == 0x80 && (tx.lock_time >> 8*3) as u8 == 0x20 { let (mut new_outpoints, new_outputs) = self.check_spend_counterparty_transaction(&tx, height, &logger); if !new_outputs.1.is_empty() { -- 2.39.5