Skip to content

Commit 720d4cc

Browse files
committed
Log when we prepare to block a channel's next revoke_and_ack
This may help in debugging blocking actions in the future.
1 parent 6cafba9 commit 720d4cc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6387,6 +6387,9 @@ where
63876387
if let ChannelPhase::Funded(chan) = chan_phase_entry.get_mut() {
63886388
let res = try_chan_phase_entry!(self, chan.update_fulfill_htlc(&msg), chan_phase_entry);
63896389
if let HTLCSource::PreviousHopData(prev_hop) = &res.0 {
6390+
log_trace!(self.logger,
6391+
"Holding the next revoke_and_ack from {} until the preimage is durably in the inbound edge's ChannelMonitor",
6392+
msg.channel_id);
63906393
peer_state.actions_blocking_raa_monitor_updates.entry(msg.channel_id)
63916394
.or_insert_with(Vec::new)
63926395
.push(RAAMonitorUpdateBlockingAction::from_prev_hop_data(&prev_hop));
@@ -9972,6 +9975,9 @@ where
99729975
Some((blocked_node_id, blocked_channel_outpoint, blocking_action)), ..
99739976
} = action {
99749977
if let Some(blocked_peer_state) = per_peer_state.get(&blocked_node_id) {
9978+
log_trace!(args.logger,
9979+
"Holding the next revoke_and_ack from {} until the preimage is durably in the inbound edge's ChannelMonitor",
9980+
blocked_channel_outpoint.to_channel_id());
99759981
blocked_peer_state.lock().unwrap().actions_blocking_raa_monitor_updates
99769982
.entry(blocked_channel_outpoint.to_channel_id())
99779983
.or_insert_with(Vec::new).push(blocking_action.clone());

0 commit comments

Comments
 (0)