@@ -1191,7 +1191,7 @@ impl UnfundedChannelContext {
1191
1191
/// Info about a pending splice, used in the pre-splice channel
1192
1192
#[cfg(splicing)]
1193
1193
#[derive(Clone)]
1194
- struct PendingSpliceInfoPre {
1194
+ struct PendingSplice {
1195
1195
pub our_funding_contribution: i64,
1196
1196
pub funding_feerate_perkw: u32,
1197
1197
pub locktime: u32,
@@ -1200,7 +1200,7 @@ struct PendingSpliceInfoPre {
1200
1200
}
1201
1201
1202
1202
#[cfg(splicing)]
1203
- impl PendingSpliceInfoPre {
1203
+ impl PendingSplice {
1204
1204
#[inline]
1205
1205
fn add_checked(base: u64, delta: i64) -> u64 {
1206
1206
if delta >= 0 {
@@ -4447,7 +4447,7 @@ pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
4447
4447
holder_commitment_point: HolderCommitmentPoint,
4448
4448
/// Info about an in-progress, pending splice (if any), on the pre-splice channel
4449
4449
#[cfg(splicing)]
4450
- pending_splice_pre: Option<PendingSpliceInfoPre >,
4450
+ pending_splice_pre: Option<PendingSplice >,
4451
4451
}
4452
4452
4453
4453
#[cfg(any(test, fuzzing))]
@@ -8111,7 +8111,7 @@ impl<SP: Deref> Channel<SP> where
8111
8111
)));
8112
8112
}
8113
8113
8114
- self.pending_splice_pre = Some(PendingSpliceInfoPre {
8114
+ self.pending_splice_pre = Some(PendingSplice {
8115
8115
our_funding_contribution: our_funding_contribution_satoshis,
8116
8116
funding_feerate_perkw,
8117
8117
locktime,
@@ -8162,8 +8162,8 @@ impl<SP: Deref> Channel<SP> where
8162
8162
)));
8163
8163
}
8164
8164
8165
- let post_channel_value = PendingSpliceInfoPre ::compute_post_value(pre_channel_value, their_funding_contribution_satoshis, our_funding_contribution_satoshis);
8166
- let post_balance = PendingSpliceInfoPre ::add_checked(self.context.value_to_self_msat, our_funding_contribution_satoshis);
8165
+ let post_channel_value = PendingSplice ::compute_post_value(pre_channel_value, their_funding_contribution_satoshis, our_funding_contribution_satoshis);
8166
+ let post_balance = PendingSplice ::add_checked(self.context.value_to_self_msat, our_funding_contribution_satoshis);
8167
8167
// Early check for reserve requirement, assuming maximum balance of full channel value
8168
8168
// This will also be checked later at tx_complete
8169
8169
let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -8199,8 +8199,8 @@ impl<SP: Deref> Channel<SP> where
8199
8199
let our_funding_contribution = pending_splice.our_funding_contribution;
8200
8200
8201
8201
let pre_channel_value = self.context.get_value_satoshis();
8202
- let post_channel_value = PendingSpliceInfoPre ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution_satoshis);
8203
- let post_balance = PendingSpliceInfoPre ::add_checked(self.context.value_to_self_msat, our_funding_contribution);
8202
+ let post_channel_value = PendingSplice ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution_satoshis);
8203
+ let post_balance = PendingSplice ::add_checked(self.context.value_to_self_msat, our_funding_contribution);
8204
8204
// Early check for reserve requirement, assuming maximum balance of full channel value
8205
8205
// This will also be checked later at tx_complete
8206
8206
let _res = self.context.check_balance_meets_reserve_requirements(post_balance, post_channel_value)?;
@@ -12429,9 +12429,9 @@ mod tests {
12429
12429
12430
12430
#[cfg(all(test, splicing))]
12431
12431
fn get_pre_and_post(pre_channel_value: u64, our_funding_contribution: i64, their_funding_contribution: i64) -> (u64, u64) {
12432
- use crate::ln::channel::PendingSpliceInfoPre ;
12432
+ use crate::ln::channel::PendingSplice ;
12433
12433
12434
- let post_channel_value = PendingSpliceInfoPre ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution);
12434
+ let post_channel_value = PendingSplice ::compute_post_value(pre_channel_value, our_funding_contribution, their_funding_contribution);
12435
12435
(pre_channel_value, post_channel_value)
12436
12436
}
12437
12437
0 commit comments