Skip to content

Commit bfa0f95

Browse files
committed
Make for_splice infallible
1 parent 35d6f65 commit bfa0f95

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lightning/src/ln/channel.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2255,7 +2255,7 @@ impl FundingScope {
22552255
fn for_splice<SP: Deref>(
22562256
prev_funding: &Self, context: &ChannelContext<SP>, our_funding_contribution: SignedAmount,
22572257
their_funding_contribution: SignedAmount, counterparty_funding_pubkey: PublicKey,
2258-
) -> Result<Self, ChannelError>
2258+
) -> Self
22592259
where
22602260
SP::Target: SignerProvider,
22612261
{
@@ -2305,7 +2305,7 @@ impl FundingScope {
23052305
let holder_selected_channel_reserve_satoshis =
23062306
get_v2_channel_reserve_satoshis(post_channel_value, MIN_CHAN_DUST_LIMIT_SATOSHIS);
23072307

2308-
Ok(Self {
2308+
Self {
23092309
channel_transaction_parameters: post_channel_transaction_parameters,
23102310
value_to_self_msat: post_value_to_self_msat,
23112311
funding_transaction: None,
@@ -2329,7 +2329,7 @@ impl FundingScope {
23292329
funding_tx_confirmed_in: None,
23302330
minimum_depth_override: None,
23312331
short_channel_id: None,
2332-
})
2332+
}
23332333
}
23342334

23352335
/// Compute the post-splice channel value from each counterparty's contributions.
@@ -11312,7 +11312,7 @@ where
1131211312
our_funding_contribution,
1131311313
their_funding_contribution,
1131411314
msg.funding_pubkey,
11315-
)?;
11315+
);
1131611316

1131711317
// TODO(splicing): Once splice acceptor can contribute, check that inputs are sufficient,
1131811318
// similarly to the check in `splice_channel`.
@@ -11533,7 +11533,7 @@ where
1153311533
our_funding_contribution,
1153411534
their_funding_contribution,
1153511535
msg.funding_pubkey,
11536-
)?;
11536+
);
1153711537

1153811538
// TODO(splicing): Pre-check for reserve requirement
1153911539
// (Note: It should also be checked later at tx_complete)

0 commit comments

Comments
 (0)