Skip to content

Commit 523b8b9

Browse files
jkczyzclaude
andcommitted
f - Test splice failure surfacing and recovery
The pinned LDK now reports `SpliceNegotiationFailed` after `ChannelClosed` for a signed round the monitor never watched at a force-close (rust-lightning issue 4967), so the test of that round asserts the reason the node surfaces, `ChannelClosing`, and that no parameters come with it, the intent having been cleared at the close. Developed with assistance from Claude Code. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 35be8fc commit 523b8b9

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎tests/integration_tests_rust.rs‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3679,7 +3679,8 @@ async fn splice_round_superseded_on_an_open_channel_fails_its_payment() {
36793679
///
36803680
/// LDK reports the round itself after `ChannelClosed`: a `DiscardFunding` for node A's
36813681
/// contribution, whose handling reclaims its addresses, and a `SpliceNegotiationFailed` the node
3682-
/// passes on.
3682+
/// reports with reason `ChannelClosing` and no parameters, its intent having been cleared at the
3683+
/// close.
36833684
#[cfg(feature = "chain-esplora")]
36843685
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
36853686
async fn signed_splice_round_the_monitor_does_not_watch_is_dropped_at_close() {
@@ -3709,7 +3710,9 @@ async fn signed_splice_round_the_monitor_does_not_watch_is_dropped_at_close() {
37093710
node_a.disconnect(node_b.node_id()).unwrap();
37103711
node_a.force_close_channel(&user_channel_id_a, node_b.node_id(), None).unwrap();
37113712
expect_event!(node_a, ChannelClosed);
3712-
expect_event!(node_a, SpliceNegotiationFailed);
3713+
let (reason, parameters) = expect_splice_negotiation_failed_event!(node_a, node_b.node_id());
3714+
assert_eq!(reason, Some(SpliceFailureReason::ChannelClosing));
3715+
assert_eq!(parameters, None, "the intent outlived the close");
37133716
assert!(
37143717
logs_a.wait_for_count(RECLAIMED_ADDRESSES, reclaimed_a + 1).await,
37153718
"node A's contribution to the discarded round was not reclaimed"

0 commit comments

Comments
 (0)