Skip to content

Commit 41c1e60

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 4a71e21 commit 41c1e60

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
@@ -6877,6 +6877,22 @@ where
68776877
contributed_inputs: Vec::new(),
68786878
contributed_outputs: Vec::new(),
68796879
}
6880+
})
6881+
.or_else(|| {
6882+
// Also check for pending quiescent action that is a splice
6883+
if let Some(QuiescentAction::Splice(_)) = self.quiescent_action.take() {
6884+
Some(SpliceFundingFailed {
6885+
channel_id: self.context.channel_id,
6886+
counterparty_node_id: self.context.counterparty_node_id,
6887+
user_channel_id: self.context.user_id,
6888+
funding_txo: None,
6889+
channel_type: None,
6890+
contributed_inputs: Vec::new(),
6891+
contributed_outputs: Vec::new(),
6892+
})
6893+
} else {
6894+
None
6895+
}
68806896
});
68816897

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

0 commit comments

Comments
 (0)