Skip to content

Commit bd156cc

Browse files
committed
Make for_splice infallible
1 parent 85dd3e5 commit bd156cc

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.
@@ -10975,7 +10975,7 @@ where
1097510975
our_funding_contribution,
1097610976
their_funding_contribution,
1097710977
msg.funding_pubkey,
10978-
)?;
10978+
);
1097910979

1098010980
// TODO(splicing): Once splice acceptor can contribute, check that inputs are sufficient,
1098110981
// similarly to the check in `splice_channel`.
@@ -11187,7 +11187,7 @@ where
1118711187
our_funding_contribution,
1118811188
their_funding_contribution,
1118911189
msg.funding_pubkey,
11190-
)?;
11190+
);
1119111191

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

0 commit comments

Comments
 (0)