@@ -1429,7 +1429,7 @@ impl UnfundedChannelContext {
1429
1429
/// Info about a pending splice, used in the pre-splice channel
1430
1430
#[cfg(splicing)]
1431
1431
#[derive(Clone)]
1432
- struct PendingSpliceInfoPre {
1432
+ struct PendingSplice {
1433
1433
pub our_funding_contribution: i64,
1434
1434
pub funding_feerate_perkw: u32,
1435
1435
pub locktime: u32,
@@ -1438,7 +1438,7 @@ struct PendingSpliceInfoPre {
1438
1438
}
1439
1439
1440
1440
#[cfg(splicing)]
1441
- impl PendingSpliceInfoPre {
1441
+ impl PendingSplice {
1442
1442
#[inline]
1443
1443
fn add_checked(base: u64, delta: i64) -> u64 {
1444
1444
if delta >= 0 {
@@ -4618,7 +4618,7 @@ pub(super) struct FundedChannel<SP: Deref> where SP::Target: SignerProvider {
4618
4618
holder_commitment_point: HolderCommitmentPoint,
4619
4619
/// Info about an in-progress, pending splice (if any), on the pre-splice channel
4620
4620
#[cfg(splicing)]
4621
- pending_splice_pre: Option<PendingSpliceInfoPre >,
4621
+ pending_splice_pre: Option<PendingSplice >,
4622
4622
}
4623
4623
4624
4624
#[cfg(any(test, fuzzing))]
@@ -8285,7 +8285,7 @@ impl<SP: Deref> FundedChannel<SP> where
8285
8285
)));
8286
8286
}
8287
8287
8288
- self.pending_splice_pre = Some(PendingSpliceInfoPre {
8288
+ self.pending_splice_pre = Some(PendingSplice {
8289
8289
our_funding_contribution: our_funding_contribution_satoshis,
8290
8290
funding_feerate_perkw,
8291
8291
locktime,
@@ -8336,8 +8336,8 @@ impl<SP: Deref> FundedChannel<SP> where
8336
8336
)));
8337
8337
}
8338
8338
8339
- let post_channel_value = PendingSpliceInfoPre ::compute_post_value(pre_channel_value, their_funding_contribution_satoshis, our_funding_contribution_satoshis);
8340
- let post_balance = PendingSpliceInfoPre ::add_checked(self.context.value_to_self_msat, our_funding_contribution_satoshis);
8339
+ let post_channel_value = PendingSplice ::compute_post_value(pre_channel_value, their_funding_contribution_satoshis, our_funding_contribution_satoshis);
8340
+ let post_balance = PendingSplice ::add_checked(self.context.value_to_self_msat, our_funding_contribution_satoshis);
8341
8341
// Early check for reserve requirement, assuming maximum balance of full channel value
8342
8342
// This will also be checked later at tx_complete
8343
8343
let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -8373,8 +8373,8 @@ impl<SP: Deref> FundedChannel<SP> where
8373
8373
let our_funding_contribution = pending_splice.our_funding_contribution;
8374
8374
8375
8375
let pre_channel_value = self.context.get_value_satoshis();
8376
- let post_channel_value = PendingSpliceInfoPre ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution_satoshis);
8377
- let post_balance = PendingSpliceInfoPre ::add_checked(self.context.value_to_self_msat, our_funding_contribution);
8376
+ let post_channel_value = PendingSplice ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution_satoshis);
8377
+ let post_balance = PendingSplice ::add_checked(self.context.value_to_self_msat, our_funding_contribution);
8378
8378
// Early check for reserve requirement, assuming maximum balance of full channel value
8379
8379
// This will also be checked later at tx_complete
8380
8380
let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -12583,9 +12583,9 @@ mod tests {
12583
12583
12584
12584
#[cfg(all(test, splicing))]
12585
12585
fn get_pre_and_post(pre_channel_value: u64, our_funding_contribution: i64, their_funding_contribution: i64) -> (u64, u64) {
12586
- use crate::ln::channel::PendingSpliceInfoPre ;
12586
+ use crate::ln::channel::PendingSplice ;
12587
12587
12588
- let post_channel_value = PendingSpliceInfoPre ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution);
12588
+ let post_channel_value = PendingSplice ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution);
12589
12589
(pre_channel_value, post_channel_value)
12590
12590
}
12591
12591
0 commit comments