Skip to content

Commit 0e1e613

Browse files
committed
f - inline fresh selection in stfu_after_splice_locked test
The earlier fixup dropped do_initiate_rbf_splice_in's value_added parameter and switched it to amend semantics. This test specifically verifies that DiscardFunding fires on the can_initiate_rbf failure path with a unique input surviving filtering, which requires fresh input selection across rounds. Inline the splice_channel + funding_contributed flow with without_prior_contribution rather than using the helper to preserve the original assertions.
1 parent bc4cc8e commit 0e1e613

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

lightning/src/ln/splicing_tests.rs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5196,10 +5196,21 @@ fn test_splice_rbf_stfu_after_splice_locked() {
51965196
// Provide more UTXOs for the RBF attempt.
51975197
provide_utxo_reserves(&nodes, 2, added_value * 2);
51985198

5199-
// Initiate RBF from node 0.
5199+
// Initiate RBF from node 0 with fresh inputs so the RBF round has a unique input that
5200+
// survives filtering when the failure cleanup runs.
52005201
let rbf_feerate = FeeRate::from_sat_per_kwu(FEERATE_FLOOR_SATS_PER_KW as u64 + 25);
5201-
let _funding_contribution =
5202-
do_initiate_rbf_splice_in(&nodes[0], &nodes[1], channel_id, added_value, rbf_feerate);
5202+
let funding_template = nodes[0].node.splice_channel(&channel_id, &node_id_1).unwrap();
5203+
let wallet = WalletSync::new(Arc::clone(&nodes[0].wallet_source), nodes[0].logger);
5204+
let funding_contribution = funding_template
5205+
.without_prior_contribution(rbf_feerate, FeeRate::MAX)
5206+
.with_coin_selection_source_sync(&wallet)
5207+
.add_value(added_value)
5208+
.build()
5209+
.unwrap();
5210+
nodes[0]
5211+
.node
5212+
.funding_contributed(&channel_id, &node_id_1, funding_contribution.clone(), None)
5213+
.unwrap();
52035214

52045215
// Node 0 sends STFU (can_initiate_rbf passes since no splice_locked yet).
52055216
let stfu_init = get_event_msg!(nodes[0], MessageSendEvent::SendStfu, node_id_1);

0 commit comments

Comments
 (0)