Skip to content

Commit 743f548

Browse files
committed
logging in channel monitor
1 parent 7272dc5 commit 743f548

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3390,6 +3390,8 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
33903390
let mut balance_spendable_csv = None;
33913391
log_info!(logger, "Channel {} closed by funding output spend in txid {}.",
33923392
&self.funding_info.0.to_channel_id(), txid);
3393+
// logging only that spends funding output
3394+
log_trace!(logger, "Transaction id {} confirmed in block {}", txid , block_hash);
33933395
self.funding_spend_seen = true;
33943396
let mut commitment_tx_to_counterparty_output = None;
33953397
if (tx.input[0].sequence.0 >> 8*3) as u8 == 0x80 && (tx.lock_time.0 >> 8*3) as u8 == 0x20 {
@@ -3438,6 +3440,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
34383440
if let Some(new_outputs) = new_outputs_option {
34393441
watch_outputs.push(new_outputs);
34403442
}
3443+
log_trace!(logger, "Transaction id {} confirmed in block {}", commitment_txid , block_hash);
34413444
// Since there may be multiple HTLCs for this channel (all spending the
34423445
// same commitment tx) being claimed by the counterparty within the same
34433446
// transaction, and `check_spend_counterparty_htlc` already checks all the

lightning/src/ln/channelmanager.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7009,12 +7009,6 @@ where
70097009
let timestamp = self.highest_seen_timestamp.load(Ordering::Acquire);
70107010
self.do_chain_event(Some(last_best_block_height), |channel| channel.best_block_updated(last_best_block_height, timestamp as u32, self.genesis_hash.clone(), &self.node_signer, &self.default_configuration, &self.logger));
70117011
}
7012-
// log each confirmed tansaction's Txid.
7013-
for tx in txdata.iter() {
7014-
let (index, transaction) = tx;
7015-
let txid = transaction.txid();
7016-
log_trace!(self.logger, "Transaction id {} confirmed in block {}", txid, block_hash);
7017-
}
70187012
}
70197013

70207014
fn best_block_updated(&self, header: &BlockHeader, height: u32) {

0 commit comments

Comments
 (0)