Skip to content

Commit df94962

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 df94962

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lightning/src/ln/channelmanager.rs

+4
Original file line numberDiff line numberDiff line change
@@ -6387,6 +6387,8 @@ 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, "Blocking the next revoke_and_ack from {} waiting on an HTLC claim.",
6391+
msg.channel_id);
63906392
peer_state.actions_blocking_raa_monitor_updates.entry(msg.channel_id)
63916393
.or_insert_with(Vec::new)
63926394
.push(RAAMonitorUpdateBlockingAction::from_prev_hop_data(&prev_hop));
@@ -9972,6 +9974,8 @@ where
99729974
Some((blocked_node_id, blocked_channel_outpoint, blocking_action)), ..
99739975
} = action {
99749976
if let Some(blocked_peer_state) = per_peer_state.get(&blocked_node_id) {
9977+
log_trace!(args.logger, "Blocking the next revoke_and_ack from {} waiting on HTLC to claim: {:?}",
9978+
blocked_channel_outpoint.to_channel_id(), blocking_action);
99759979
blocked_peer_state.lock().unwrap().actions_blocking_raa_monitor_updates
99769980
.entry(blocked_channel_outpoint.to_channel_id())
99779981
.or_insert_with(Vec::new).push(blocking_action.clone());

0 commit comments

Comments
 (0)