@@ -1186,7 +1186,7 @@ impl UnfundedChannelContext {
1186
1186
/// Info about a pending splice, used in the pre-splice channel
1187
1187
#[cfg(splicing)]
1188
1188
#[derive(Clone)]
1189
- struct PendingSpliceInfoPre {
1189
+ struct PendingSplice {
1190
1190
pub our_funding_contribution: i64,
1191
1191
pub funding_feerate_perkw: u32,
1192
1192
pub locktime: u32,
@@ -1195,7 +1195,7 @@ struct PendingSpliceInfoPre {
1195
1195
}
1196
1196
1197
1197
#[cfg(splicing)]
1198
- impl PendingSpliceInfoPre {
1198
+ impl PendingSplice {
1199
1199
#[inline]
1200
1200
fn add_checked(base: u64, delta: i64) -> u64 {
1201
1201
if delta >= 0 {
@@ -4316,7 +4316,7 @@ pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
4316
4316
pub interactive_tx_signing_session: Option<InteractiveTxSigningSession>,
4317
4317
/// Info about an in-progress, pending splice (if any), on the pre-splice channel
4318
4318
#[cfg(splicing)]
4319
- pending_splice_pre: Option<PendingSpliceInfoPre >,
4319
+ pending_splice_pre: Option<PendingSplice >,
4320
4320
}
4321
4321
4322
4322
#[cfg(any(test, fuzzing))]
@@ -7970,7 +7970,7 @@ impl<SP: Deref> Channel<SP> where
7970
7970
)));
7971
7971
}
7972
7972
7973
- self.pending_splice_pre = Some(PendingSpliceInfoPre {
7973
+ self.pending_splice_pre = Some(PendingSplice {
7974
7974
our_funding_contribution: our_funding_contribution_satoshis,
7975
7975
funding_feerate_perkw,
7976
7976
locktime,
@@ -8021,8 +8021,8 @@ impl<SP: Deref> Channel<SP> where
8021
8021
)));
8022
8022
}
8023
8023
8024
- let post_channel_value = PendingSpliceInfoPre ::compute_post_value(pre_channel_value, their_funding_contribution_satoshis, our_funding_contribution_satoshis);
8025
- let post_balance = PendingSpliceInfoPre ::add_checked(self.context.value_to_self_msat, our_funding_contribution_satoshis);
8024
+ let post_channel_value = PendingSplice ::compute_post_value(pre_channel_value, their_funding_contribution_satoshis, our_funding_contribution_satoshis);
8025
+ let post_balance = PendingSplice ::add_checked(self.context.value_to_self_msat, our_funding_contribution_satoshis);
8026
8026
// Early check for reserve requirement, assuming maximum balance of full channel value
8027
8027
// This will also be checked later at tx_complete
8028
8028
let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -8058,8 +8058,8 @@ impl<SP: Deref> Channel<SP> where
8058
8058
let our_funding_contribution = pending_splice.our_funding_contribution;
8059
8059
8060
8060
let pre_channel_value = self.context.get_value_satoshis();
8061
- let post_channel_value = PendingSpliceInfoPre ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution_satoshis);
8062
- let post_balance = PendingSpliceInfoPre ::add_checked(self.context.value_to_self_msat, our_funding_contribution);
8061
+ let post_channel_value = PendingSplice ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution_satoshis);
8062
+ let post_balance = PendingSplice ::add_checked(self.context.value_to_self_msat, our_funding_contribution);
8063
8063
// Early check for reserve requirement, assuming maximum balance of full channel value
8064
8064
// This will also be checked later at tx_complete
8065
8065
let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -12186,9 +12186,9 @@ mod tests {
12186
12186
12187
12187
#[cfg(all(test, splicing))]
12188
12188
fn get_pre_and_post(pre_channel_value: u64, our_funding_contribution: i64, their_funding_contribution: i64) -> (u64, u64) {
12189
- use crate::ln::channel::PendingSpliceInfoPre ;
12189
+ use crate::ln::channel::PendingSplice ;
12190
12190
12191
- let post_channel_value = PendingSpliceInfoPre ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution);
12191
+ let post_channel_value = PendingSplice ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution);
12192
12192
(pre_channel_value, post_channel_value)
12193
12193
}
12194
12194
0 commit comments