@@ -1187,7 +1187,7 @@ impl UnfundedChannelContext {
11871187/// Info about a pending splice, used in the pre-splice channel
11881188#[cfg(splicing)]
11891189#[derive(Clone)]
1190- struct PendingSpliceInfoPre {
1190+ struct PendingSplice {
11911191 pub our_funding_contribution: i64,
11921192 pub funding_feerate_perkw: u32,
11931193 pub locktime: u32,
@@ -1196,7 +1196,7 @@ struct PendingSpliceInfoPre {
11961196}
11971197
11981198#[cfg(splicing)]
1199- impl PendingSpliceInfoPre {
1199+ impl PendingSplice {
12001200 #[inline]
12011201 fn add_checked(base: u64, delta: i64) -> u64 {
12021202 if delta >= 0 {
@@ -4442,7 +4442,7 @@ pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
44424442 pub interactive_tx_signing_session: Option<InteractiveTxSigningSession>,
44434443 /// Info about an in-progress, pending splice (if any), on the pre-splice channel
44444444 #[cfg(splicing)]
4445- pending_splice_pre: Option<PendingSpliceInfoPre >,
4445+ pending_splice_pre: Option<PendingSplice >,
44464446}
44474447
44484448#[cfg(any(test, fuzzing))]
@@ -8096,7 +8096,7 @@ impl<SP: Deref> Channel<SP> where
80968096 )));
80978097 }
80988098
8099- self.pending_splice_pre = Some(PendingSpliceInfoPre {
8099+ self.pending_splice_pre = Some(PendingSplice {
81008100 our_funding_contribution: our_funding_contribution_satoshis,
81018101 funding_feerate_perkw,
81028102 locktime,
@@ -8147,8 +8147,8 @@ impl<SP: Deref> Channel<SP> where
81478147 )));
81488148 }
81498149
8150- let post_channel_value = PendingSpliceInfoPre ::compute_post_value(pre_channel_value, their_funding_contribution_satoshis, our_funding_contribution_satoshis);
8151- let post_balance = PendingSpliceInfoPre ::add_checked(self.context.value_to_self_msat, our_funding_contribution_satoshis);
8150+ let post_channel_value = PendingSplice ::compute_post_value(pre_channel_value, their_funding_contribution_satoshis, our_funding_contribution_satoshis);
8151+ let post_balance = PendingSplice ::add_checked(self.context.value_to_self_msat, our_funding_contribution_satoshis);
81528152 // Early check for reserve requirement, assuming maximum balance of full channel value
81538153 // This will also be checked later at tx_complete
81548154 let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -8184,8 +8184,8 @@ impl<SP: Deref> Channel<SP> where
81848184 let our_funding_contribution = pending_splice.our_funding_contribution;
81858185
81868186 let pre_channel_value = self.context.get_value_satoshis();
8187- let post_channel_value = PendingSpliceInfoPre ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution_satoshis);
8188- let post_balance = PendingSpliceInfoPre ::add_checked(self.context.value_to_self_msat, our_funding_contribution);
8187+ let post_channel_value = PendingSplice ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution_satoshis);
8188+ let post_balance = PendingSplice ::add_checked(self.context.value_to_self_msat, our_funding_contribution);
81898189 // Early check for reserve requirement, assuming maximum balance of full channel value
81908190 // This will also be checked later at tx_complete
81918191 let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -12314,9 +12314,9 @@ mod tests {
1231412314
1231512315 #[cfg(all(test, splicing))]
1231612316 fn get_pre_and_post(pre_channel_value: u64, our_funding_contribution: i64, their_funding_contribution: i64) -> (u64, u64) {
12317- use crate::ln::channel::PendingSpliceInfoPre ;
12317+ use crate::ln::channel::PendingSplice ;
1231812318
12319- let post_channel_value = PendingSpliceInfoPre ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution);
12319+ let post_channel_value = PendingSplice ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution);
1232012320 (pre_channel_value, post_channel_value)
1232112321 }
1232212322
0 commit comments