@@ -1543,7 +1543,7 @@ impl UnfundedChannelContext {
1543
1543
/// Info about a pending splice, used in the pre-splice channel
1544
1544
#[cfg(splicing)]
1545
1545
#[derive(Clone)]
1546
- struct PendingSpliceInfoPre {
1546
+ struct PendingSplice {
1547
1547
pub our_funding_contribution: i64,
1548
1548
pub funding_feerate_perkw: u32,
1549
1549
pub locktime: u32,
@@ -1552,7 +1552,7 @@ struct PendingSpliceInfoPre {
1552
1552
}
1553
1553
1554
1554
#[cfg(splicing)]
1555
- impl PendingSpliceInfoPre {
1555
+ impl PendingSplice {
1556
1556
#[inline]
1557
1557
fn add_checked(base: u64, delta: i64) -> u64 {
1558
1558
if delta >= 0 {
@@ -4743,7 +4743,7 @@ pub(super) struct FundedChannel<SP: Deref> where SP::Target: SignerProvider {
4743
4743
holder_commitment_point: HolderCommitmentPoint,
4744
4744
/// Info about an in-progress, pending splice (if any), on the pre-splice channel
4745
4745
#[cfg(splicing)]
4746
- pending_splice_pre: Option<PendingSpliceInfoPre >,
4746
+ pending_splice_pre: Option<PendingSplice >,
4747
4747
}
4748
4748
4749
4749
#[cfg(any(test, fuzzing))]
@@ -8375,7 +8375,7 @@ impl<SP: Deref> FundedChannel<SP> where
8375
8375
)));
8376
8376
}
8377
8377
8378
- self.pending_splice_pre = Some(PendingSpliceInfoPre {
8378
+ self.pending_splice_pre = Some(PendingSplice {
8379
8379
our_funding_contribution: our_funding_contribution_satoshis,
8380
8380
funding_feerate_perkw,
8381
8381
locktime,
@@ -8426,8 +8426,8 @@ impl<SP: Deref> FundedChannel<SP> where
8426
8426
)));
8427
8427
}
8428
8428
8429
- let post_channel_value = PendingSpliceInfoPre ::compute_post_value(pre_channel_value, their_funding_contribution_satoshis, our_funding_contribution_satoshis);
8430
- let post_balance = PendingSpliceInfoPre ::add_checked(self.context.value_to_self_msat, our_funding_contribution_satoshis);
8429
+ let post_channel_value = PendingSplice ::compute_post_value(pre_channel_value, their_funding_contribution_satoshis, our_funding_contribution_satoshis);
8430
+ let post_balance = PendingSplice ::add_checked(self.context.value_to_self_msat, our_funding_contribution_satoshis);
8431
8431
// Early check for reserve requirement, assuming maximum balance of full channel value
8432
8432
// This will also be checked later at tx_complete
8433
8433
let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -8463,8 +8463,8 @@ impl<SP: Deref> FundedChannel<SP> where
8463
8463
let our_funding_contribution = pending_splice.our_funding_contribution;
8464
8464
8465
8465
let pre_channel_value = self.context.get_value_satoshis();
8466
- let post_channel_value = PendingSpliceInfoPre ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution_satoshis);
8467
- let post_balance = PendingSpliceInfoPre ::add_checked(self.context.value_to_self_msat, our_funding_contribution);
8466
+ let post_channel_value = PendingSplice ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution_satoshis);
8467
+ let post_balance = PendingSplice ::add_checked(self.context.value_to_self_msat, our_funding_contribution);
8468
8468
// Early check for reserve requirement, assuming maximum balance of full channel value
8469
8469
// This will also be checked later at tx_complete
8470
8470
let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -12611,9 +12611,9 @@ mod tests {
12611
12611
12612
12612
#[cfg(all(test, splicing))]
12613
12613
fn get_pre_and_post(pre_channel_value: u64, our_funding_contribution: i64, their_funding_contribution: i64) -> (u64, u64) {
12614
- use crate::ln::channel::PendingSpliceInfoPre ;
12614
+ use crate::ln::channel::PendingSplice ;
12615
12615
12616
- let post_channel_value = PendingSpliceInfoPre ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution);
12616
+ let post_channel_value = PendingSplice ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution);
12617
12617
(pre_channel_value, post_channel_value)
12618
12618
}
12619
12619
0 commit comments