Skip to content

Commit 0db24f3

Browse files
jkczyzclaude
andcommitted
Emit SpliceFailed event when channels close with pending splice actions
Users need to be notified when splice operations are cancelled due to channel closure, regardless of the splice phase. Previously, splice operations that were scheduled but not yet in active negotiation were silently lost during channel shutdown, leaving users unaware of the failed splice attempt. Now emits Event::SpliceFailed when a channel shuts down with a pending QuiescentAction::Splice, ensuring comprehensive splice failure reporting across all phases of the splice lifecycle. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 8f8eb77 commit 0db24f3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

lightning/src/ln/channel.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6880,6 +6880,22 @@ where
68806880
contributed_inputs: Vec::new(),
68816881
contributed_outputs: Vec::new(),
68826882
}
6883+
})
6884+
.or_else(|| {
6885+
// Also check for pending quiescent action that is a splice
6886+
if let Some(QuiescentAction::Splice(_)) = self.quiescent_action.take() {
6887+
Some(SpliceFundingFailed {
6888+
channel_id: self.context.channel_id,
6889+
counterparty_node_id: self.context.counterparty_node_id,
6890+
user_channel_id: self.context.user_id,
6891+
funding_txo: None,
6892+
channel_type: None,
6893+
contributed_inputs: Vec::new(),
6894+
contributed_outputs: Vec::new(),
6895+
})
6896+
} else {
6897+
None
6898+
}
68836899
});
68846900

68856901
let mut shutdown_result = self.context.force_shutdown(&self.funding, closure_reason);

0 commit comments

Comments
 (0)