Skip to content

Commit 9b5d489

Browse files
committed
Add a useful log_trace before we release holding cell.
1 parent bc1970c commit 9b5d489

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ln/channel.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,6 +1851,8 @@ impl Channel {
18511851
fn free_holding_cell_htlcs(&mut self) -> Result<Option<(msgs::CommitmentUpdate, ChannelMonitor)>, ChannelError> {
18521852
assert_eq!(self.channel_state & ChannelState::MonitorUpdateFailed as u32, 0);
18531853
if self.holding_cell_htlc_updates.len() != 0 || self.holding_cell_update_fee.is_some() {
1854+
log_trace!(self, "Freeing holding cell with {} HTLC updates{}", self.holding_cell_htlc_updates.len(), if self.holding_cell_update_fee.is_some() { " and a fee update" } else { "" });
1855+
18541856
let mut htlc_updates = Vec::new();
18551857
mem::swap(&mut htlc_updates, &mut self.holding_cell_htlc_updates);
18561858
let mut update_add_htlcs = Vec::with_capacity(htlc_updates.len());

0 commit comments

Comments
 (0)