@@ -1543,7 +1543,7 @@ impl UnfundedChannelContext {
15431543/// Info about a pending splice, used in the pre-splice channel
15441544#[cfg(splicing)]
15451545#[derive(Clone)]
1546- struct PendingSpliceInfoPre {
1546+ struct PendingSplice {
15471547 pub our_funding_contribution: i64,
15481548 pub funding_feerate_perkw: u32,
15491549 pub locktime: u32,
@@ -1552,7 +1552,7 @@ struct PendingSpliceInfoPre {
15521552}
15531553
15541554#[cfg(splicing)]
1555- impl PendingSpliceInfoPre {
1555+ impl PendingSplice {
15561556 #[inline]
15571557 fn add_checked(base: u64, delta: i64) -> u64 {
15581558 if delta >= 0 {
@@ -4743,7 +4743,7 @@ pub(super) struct FundedChannel<SP: Deref> where SP::Target: SignerProvider {
47434743 holder_commitment_point: HolderCommitmentPoint,
47444744 /// Info about an in-progress, pending splice (if any), on the pre-splice channel
47454745 #[cfg(splicing)]
4746- pending_splice_pre: Option<PendingSpliceInfoPre >,
4746+ pending_splice_pre: Option<PendingSplice >,
47474747}
47484748
47494749#[cfg(any(test, fuzzing))]
@@ -8375,7 +8375,7 @@ impl<SP: Deref> FundedChannel<SP> where
83758375 )));
83768376 }
83778377
8378- self.pending_splice_pre = Some(PendingSpliceInfoPre {
8378+ self.pending_splice_pre = Some(PendingSplice {
83798379 our_funding_contribution: our_funding_contribution_satoshis,
83808380 funding_feerate_perkw,
83818381 locktime,
@@ -8426,8 +8426,8 @@ impl<SP: Deref> FundedChannel<SP> where
84268426 )));
84278427 }
84288428
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);
84318431 // Early check for reserve requirement, assuming maximum balance of full channel value
84328432 // This will also be checked later at tx_complete
84338433 let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -8463,8 +8463,8 @@ impl<SP: Deref> FundedChannel<SP> where
84638463 let our_funding_contribution = pending_splice.our_funding_contribution;
84648464
84658465 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);
84688468 // Early check for reserve requirement, assuming maximum balance of full channel value
84698469 // This will also be checked later at tx_complete
84708470 let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -12611,9 +12611,9 @@ mod tests {
1261112611
1261212612 #[cfg(all(test, splicing))]
1261312613 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 ;
1261512615
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);
1261712617 (pre_channel_value, post_channel_value)
1261812618 }
1261912619
0 commit comments