Skip to content

Commit f1fafd6

Browse files
committed
Rename PendingInfo
1 parent bf5988d commit f1fafd6

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
@@ -1186,7 +1186,7 @@ impl UnfundedChannelContext {
11861186
/// Info about a pending splice, used in the pre-splice channel
11871187
#[cfg(splicing)]
11881188
#[derive(Clone)]
1189-
struct PendingSpliceInfoPre {
1189+
struct PendingSplice {
11901190
pub our_funding_contribution: i64,
11911191
pub funding_feerate_perkw: u32,
11921192
pub locktime: u32,
@@ -1195,7 +1195,7 @@ struct PendingSpliceInfoPre {
11951195
}
11961196

11971197
#[cfg(splicing)]
1198-
impl PendingSpliceInfoPre {
1198+
impl PendingSplice {
11991199
#[inline]
12001200
fn add_checked(base: u64, delta: i64) -> u64 {
12011201
if delta >= 0 {
@@ -4316,7 +4316,7 @@ pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
43164316
pub interactive_tx_signing_session: Option<InteractiveTxSigningSession>,
43174317
/// Info about an in-progress, pending splice (if any), on the pre-splice channel
43184318
#[cfg(splicing)]
4319-
pending_splice_pre: Option<PendingSpliceInfoPre>,
4319+
pending_splice_pre: Option<PendingSplice>,
43204320
}
43214321

43224322
#[cfg(any(test, fuzzing))]
@@ -7970,7 +7970,7 @@ impl<SP: Deref> Channel<SP> where
79707970
)));
79717971
}
79727972

7973-
self.pending_splice_pre = Some(PendingSpliceInfoPre {
7973+
self.pending_splice_pre = Some(PendingSplice {
79747974
our_funding_contribution: our_funding_contribution_satoshis,
79757975
funding_feerate_perkw,
79767976
locktime,
@@ -8021,8 +8021,8 @@ impl<SP: Deref> Channel<SP> where
80218021
)));
80228022
}
80238023

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);
80268026
// Early check for reserve requirement, assuming maximum balance of full channel value
80278027
// This will also be checked later at tx_complete
80288028
let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -8058,8 +8058,8 @@ impl<SP: Deref> Channel<SP> where
80588058
let our_funding_contribution = pending_splice.our_funding_contribution;
80598059

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

1218712187
#[cfg(all(test, splicing))]
1218812188
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;
1219012190

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);
1219212192
(pre_channel_value, post_channel_value)
1219312193
}
1219412194

0 commit comments

Comments
 (0)