]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Log when we prepare to block a channel's next `revoke_and_ack`
authorMatt Corallo <git@bluematt.me>
Wed, 11 Oct 2023 01:39:26 +0000 (01:39 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 19 Oct 2023 15:27:57 +0000 (15:27 +0000)
This may help in debugging blocking actions in the future.

lightning/src/ln/channelmanager.rs

index 1e9a3ed011def00672e46053391ac2b7d4f723ea..69093d7f6a35ce22cc67fc2167ebc6e0d2974d4d 100644 (file)
@@ -6387,6 +6387,9 @@ where
                                        if let ChannelPhase::Funded(chan) = chan_phase_entry.get_mut() {
                                                let res = try_chan_phase_entry!(self, chan.update_fulfill_htlc(&msg), chan_phase_entry);
                                                if let HTLCSource::PreviousHopData(prev_hop) = &res.0 {
+                                                       log_trace!(self.logger,
+                                                               "Holding the next revoke_and_ack from {} until the preimage is durably persisted in the inbound edge's ChannelMonitor",
+                                                               msg.channel_id);
                                                        peer_state.actions_blocking_raa_monitor_updates.entry(msg.channel_id)
                                                                .or_insert_with(Vec::new)
                                                                .push(RAAMonitorUpdateBlockingAction::from_prev_hop_data(&prev_hop));
@@ -9972,6 +9975,9 @@ where
                                                                Some((blocked_node_id, blocked_channel_outpoint, blocking_action)), ..
                                                } = action {
                                                        if let Some(blocked_peer_state) = per_peer_state.get(&blocked_node_id) {
+                                                               log_trace!(args.logger,
+                                                                       "Holding the next revoke_and_ack from {} until the preimage is durably persisted in the inbound edge's ChannelMonitor",
+                                                                       blocked_channel_outpoint.to_channel_id());
                                                                blocked_peer_state.lock().unwrap().actions_blocking_raa_monitor_updates
                                                                        .entry(blocked_channel_outpoint.to_channel_id())
                                                                        .or_insert_with(Vec::new).push(blocking_action.clone());