@@ -1187,7 +1187,7 @@ impl UnfundedChannelContext {
1187
1187
/// Info about a pending splice, used in the pre-splice channel
1188
1188
#[cfg(splicing)]
1189
1189
#[derive(Clone)]
1190
- struct PendingSpliceInfoPre {
1190
+ struct PendingSplice {
1191
1191
pub our_funding_contribution: i64,
1192
1192
pub funding_feerate_perkw: u32,
1193
1193
pub locktime: u32,
@@ -1196,7 +1196,7 @@ struct PendingSpliceInfoPre {
1196
1196
}
1197
1197
1198
1198
#[cfg(splicing)]
1199
- impl PendingSpliceInfoPre {
1199
+ impl PendingSplice {
1200
1200
#[inline]
1201
1201
fn add_checked(base: u64, delta: i64) -> u64 {
1202
1202
if delta >= 0 {
@@ -4442,7 +4442,7 @@ pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
4442
4442
pub interactive_tx_signing_session: Option<InteractiveTxSigningSession>,
4443
4443
/// Info about an in-progress, pending splice (if any), on the pre-splice channel
4444
4444
#[cfg(splicing)]
4445
- pending_splice_pre: Option<PendingSpliceInfoPre >,
4445
+ pending_splice_pre: Option<PendingSplice >,
4446
4446
}
4447
4447
4448
4448
#[cfg(any(test, fuzzing))]
@@ -8096,7 +8096,7 @@ impl<SP: Deref> Channel<SP> where
8096
8096
)));
8097
8097
}
8098
8098
8099
- self.pending_splice_pre = Some(PendingSpliceInfoPre {
8099
+ self.pending_splice_pre = Some(PendingSplice {
8100
8100
our_funding_contribution: our_funding_contribution_satoshis,
8101
8101
funding_feerate_perkw,
8102
8102
locktime,
@@ -8147,8 +8147,8 @@ impl<SP: Deref> Channel<SP> where
8147
8147
)));
8148
8148
}
8149
8149
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);
8152
8152
// Early check for reserve requirement, assuming maximum balance of full channel value
8153
8153
// This will also be checked later at tx_complete
8154
8154
let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -8184,8 +8184,8 @@ impl<SP: Deref> Channel<SP> where
8184
8184
let our_funding_contribution = pending_splice.our_funding_contribution;
8185
8185
8186
8186
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);
8189
8189
// Early check for reserve requirement, assuming maximum balance of full channel value
8190
8190
// This will also be checked later at tx_complete
8191
8191
let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -12314,9 +12314,9 @@ mod tests {
12314
12314
12315
12315
#[cfg(all(test, splicing))]
12316
12316
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 ;
12318
12318
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);
12320
12320
(pre_channel_value, post_channel_value)
12321
12321
}
12322
12322
0 commit comments