Skip to content

Commit d0d3692

Browse files
committed
Rename PendingInfo
1 parent 321949c commit d0d3692

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lightning/src/ln/channel.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,7 +1429,7 @@ impl UnfundedChannelContext {
14291429
/// Info about a pending splice, used in the pre-splice channel
14301430
#[cfg(splicing)]
14311431
#[derive(Clone)]
1432-
struct PendingSpliceInfoPre {
1432+
struct PendingSplice {
14331433
pub our_funding_contribution: i64,
14341434
pub funding_feerate_perkw: u32,
14351435
pub locktime: u32,
@@ -1438,7 +1438,7 @@ struct PendingSpliceInfoPre {
14381438
}
14391439

14401440
#[cfg(splicing)]
1441-
impl PendingSpliceInfoPre {
1441+
impl PendingSplice {
14421442
#[inline]
14431443
fn add_checked(base: u64, delta: i64) -> u64 {
14441444
if delta >= 0 {
@@ -4618,7 +4618,7 @@ pub(super) struct FundedChannel<SP: Deref> where SP::Target: SignerProvider {
46184618
holder_commitment_point: HolderCommitmentPoint,
46194619
/// Info about an in-progress, pending splice (if any), on the pre-splice channel
46204620
#[cfg(splicing)]
4621-
pending_splice_pre: Option<PendingSpliceInfoPre>,
4621+
pending_splice_pre: Option<PendingSplice>,
46224622
}
46234623

46244624
#[cfg(any(test, fuzzing))]
@@ -8285,7 +8285,7 @@ impl<SP: Deref> FundedChannel<SP> where
82858285
)));
82868286
}
82878287

8288-
self.pending_splice_pre = Some(PendingSpliceInfoPre {
8288+
self.pending_splice_pre = Some(PendingSplice {
82898289
our_funding_contribution: our_funding_contribution_satoshis,
82908290
funding_feerate_perkw,
82918291
locktime,
@@ -8336,8 +8336,8 @@ impl<SP: Deref> FundedChannel<SP> where
83368336
)));
83378337
}
83388338

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);
83418341
// Early check for reserve requirement, assuming maximum balance of full channel value
83428342
// This will also be checked later at tx_complete
83438343
let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -8373,8 +8373,8 @@ impl<SP: Deref> FundedChannel<SP> where
83738373
let our_funding_contribution = pending_splice.our_funding_contribution;
83748374

83758375
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);
83788378
// Early check for reserve requirement, assuming maximum balance of full channel value
83798379
// This will also be checked later at tx_complete
83808380
let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -12583,9 +12583,9 @@ mod tests {
1258312583

1258412584
#[cfg(all(test, splicing))]
1258512585
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;
1258712587

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);
1258912589
(pre_channel_value, post_channel_value)
1259012590
}
1259112591

0 commit comments

Comments
 (0)