From: Matt Corallo Date: Sat, 20 Nov 2021 22:27:10 +0000 (+0000) Subject: Correct txid logging to reverse bytes. X-Git-Tag: v0.0.104~30^2~1 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=0b072834ab92081bba4ec907b39f1aa78953016c;p=rust-lightning 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. --- 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() {