Skip to content

Commit e55084c

Browse files
committed
Make for_splice infallible
1 parent 6fd902a commit e55084c

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
@@ -2248,7 +2248,7 @@ impl FundingScope {
22482248
fn for_splice<SP: Deref>(
22492249
prev_funding: &Self, context: &ChannelContext<SP>, our_funding_contribution: SignedAmount,
22502250
their_funding_contribution: SignedAmount, counterparty_funding_pubkey: PublicKey,
2251-
) -> Result<Self, ChannelError>
2251+
) -> Self
22522252
where
22532253
SP::Target: SignerProvider,
22542254
{
@@ -2298,7 +2298,7 @@ impl FundingScope {
22982298
let holder_selected_channel_reserve_satoshis =
22992299
get_v2_channel_reserve_satoshis(post_channel_value, MIN_CHAN_DUST_LIMIT_SATOSHIS);
23002300

2301-
Ok(Self {
2301+
Self {
23022302
channel_transaction_parameters: post_channel_transaction_parameters,
23032303
value_to_self_msat: post_value_to_self_msat,
23042304
funding_transaction: None,
@@ -2322,7 +2322,7 @@ impl FundingScope {
23222322
funding_tx_confirmed_in: None,
23232323
minimum_depth_override: None,
23242324
short_channel_id: None,
2325-
})
2325+
}
23262326
}
23272327

23282328
/// Compute the post-splice channel value from each counterparty's contributions.
@@ -11120,7 +11120,7 @@ where
1112011120
our_funding_contribution,
1112111121
their_funding_contribution,
1112211122
msg.funding_pubkey,
11123-
)?;
11123+
);
1112411124

1112511125
// TODO(splicing): Once splice acceptor can contribute, check that inputs are sufficient,
1112611126
// similarly to the check in `splice_channel`.
@@ -11332,7 +11332,7 @@ where
1133211332
our_funding_contribution,
1133311333
their_funding_contribution,
1133411334
msg.funding_pubkey,
11335-
)?;
11335+
);
1133611336

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

0 commit comments

Comments
 (0)