@@ -1191,7 +1191,7 @@ impl UnfundedChannelContext {
11911191/// Info about a pending splice, used in the pre-splice channel
11921192#[cfg(splicing)]
11931193#[derive(Clone)]
1194- struct PendingSpliceInfoPre {
1194+ struct PendingSplice {
11951195 pub our_funding_contribution: i64,
11961196 pub funding_feerate_perkw: u32,
11971197 pub locktime: u32,
@@ -1200,7 +1200,7 @@ struct PendingSpliceInfoPre {
12001200}
12011201
12021202#[cfg(splicing)]
1203- impl PendingSpliceInfoPre {
1203+ impl PendingSplice {
12041204 #[inline]
12051205 fn add_checked(base: u64, delta: i64) -> u64 {
12061206 if delta >= 0 {
@@ -4447,7 +4447,7 @@ pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
44474447 holder_commitment_point: HolderCommitmentPoint,
44484448 /// Info about an in-progress, pending splice (if any), on the pre-splice channel
44494449 #[cfg(splicing)]
4450- pending_splice_pre: Option<PendingSpliceInfoPre >,
4450+ pending_splice_pre: Option<PendingSplice >,
44514451}
44524452
44534453#[cfg(any(test, fuzzing))]
@@ -8111,7 +8111,7 @@ impl<SP: Deref> Channel<SP> where
81118111 )));
81128112 }
81138113
8114- self.pending_splice_pre = Some(PendingSpliceInfoPre {
8114+ self.pending_splice_pre = Some(PendingSplice {
81158115 our_funding_contribution: our_funding_contribution_satoshis,
81168116 funding_feerate_perkw,
81178117 locktime,
@@ -8162,8 +8162,8 @@ impl<SP: Deref> Channel<SP> where
81628162 )));
81638163 }
81648164
8165- let post_channel_value = PendingSpliceInfoPre ::compute_post_value(pre_channel_value, their_funding_contribution_satoshis, our_funding_contribution_satoshis);
8166- let post_balance = PendingSpliceInfoPre ::add_checked(self.context.value_to_self_msat, our_funding_contribution_satoshis);
8165+ let post_channel_value = PendingSplice ::compute_post_value(pre_channel_value, their_funding_contribution_satoshis, our_funding_contribution_satoshis);
8166+ let post_balance = PendingSplice ::add_checked(self.context.value_to_self_msat, our_funding_contribution_satoshis);
81678167 // Early check for reserve requirement, assuming maximum balance of full channel value
81688168 // This will also be checked later at tx_complete
81698169 let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -8199,8 +8199,8 @@ impl<SP: Deref> Channel<SP> where
81998199 let our_funding_contribution = pending_splice.our_funding_contribution;
82008200
82018201 let pre_channel_value = self.context.get_value_satoshis();
8202- let post_channel_value = PendingSpliceInfoPre ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution_satoshis);
8203- let post_balance = PendingSpliceInfoPre ::add_checked(self.context.value_to_self_msat, our_funding_contribution);
8202+ let post_channel_value = PendingSplice ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution_satoshis);
8203+ let post_balance = PendingSplice ::add_checked(self.context.value_to_self_msat, our_funding_contribution);
82048204 // Early check for reserve requirement, assuming maximum balance of full channel value
82058205 // This will also be checked later at tx_complete
82068206 let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -12429,9 +12429,9 @@ mod tests {
1242912429
1243012430 #[cfg(all(test, splicing))]
1243112431 fn get_pre_and_post(pre_channel_value: u64, our_funding_contribution: i64, their_funding_contribution: i64) -> (u64, u64) {
12432- use crate::ln::channel::PendingSpliceInfoPre ;
12432+ use crate::ln::channel::PendingSplice ;
1243312433
12434- let post_channel_value = PendingSpliceInfoPre ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution);
12434+ let post_channel_value = PendingSplice ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution);
1243512435 (pre_channel_value, post_channel_value)
1243612436 }
1243712437
0 commit comments