Skip to content

Commit b2236a6

Browse files
committed
logging confirmed txid
1 parent 1cece1b commit b2236a6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6992,6 +6992,12 @@ where
69926992
let timestamp = self.highest_seen_timestamp.load(Ordering::Acquire);
69936993
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));
69946994
}
6995+
// log each confirmed tansaction's Txid.
6996+
for tx in txdata.iter() {
6997+
let (index, transaction) = tx;
6998+
let txid = transaction.txid();
6999+
log_trace!(self.logger, "Transaction id {} confirmed in block {}", txid, block_hash);
7000+
}
69957001
}
69967002

69977003
fn best_block_updated(&self, header: &BlockHeader, height: u32) {
@@ -7326,7 +7332,6 @@ where
73267332
fn handle_channel_ready(&self, counterparty_node_id: &PublicKey, msg: &msgs::ChannelReady) {
73277333
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(self);
73287334
let _ = handle_error!(self, self.internal_channel_ready(counterparty_node_id, msg), *counterparty_node_id);
7329-
log_trace!(self.logger, "connected txids Channel_id {}", msg.channel_id);
73307335
}
73317336

73327337
fn handle_shutdown(&self, counterparty_node_id: &PublicKey, msg: &msgs::Shutdown) {

0 commit comments

Comments
 (0)