Skip to content

Commit 65a257b

Browse files
committed
f - inline fresh selection in discard_unique_contribution test
This test specifically requires fresh inputs across RBF rounds (it clears the wallet between rounds and asserts the inputs differ). Inline the splice_channel + funding_contributed flow with without_prior_contribution rather than using a helper, since this is the only call site that needs that behavior.
1 parent 0653be6 commit 65a257b

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

lightning/src/ln/splicing_tests.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4743,8 +4743,18 @@ fn test_splice_rbf_discard_unique_contribution() {
47434743

47444744
// Round 1: RBF with fresh UTXOs, splice-in only (no splice-out output).
47454745
let rbf_feerate = FeeRate::from_sat_per_kwu(FEERATE_FLOOR_SATS_PER_KW as u64 + 25);
4746-
let funding_contribution =
4747-
do_initiate_rbf_splice_in(&nodes[0], &nodes[1], channel_id, added_value, rbf_feerate);
4746+
let funding_template = nodes[0].node.splice_channel(&channel_id, &node_id_1).unwrap();
4747+
let wallet = WalletSync::new(Arc::clone(&nodes[0].wallet_source), nodes[0].logger);
4748+
let funding_contribution = funding_template
4749+
.without_prior_contribution(rbf_feerate, FeeRate::MAX)
4750+
.with_coin_selection_source_sync(&wallet)
4751+
.add_value(added_value)
4752+
.build()
4753+
.unwrap();
4754+
nodes[0]
4755+
.node
4756+
.funding_contributed(&channel_id, &node_id_1, funding_contribution.clone(), None)
4757+
.unwrap();
47484758
let round_1_inputs: Vec<_> = funding_contribution.contributed_inputs().collect();
47494759
assert_ne!(round_0_inputs, round_1_inputs, "Rounds must use different UTXOs");
47504760

0 commit comments

Comments
 (0)