Skip to content

Commit 2f6e346

Browse files
committed
Rename PendingSplice to PendingFunding
While PendingSplice is only used for splicing a FundedChannel, it will be useful when supporting RBF for V2 channel establishment.
1 parent fc348b6 commit 2f6e346

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

lightning/src/ln/channel.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2170,10 +2170,15 @@ impl FundingScope {
21702170
}
21712171
}
21722172

2173-
/// Info about a pending splice, used in the pre-splice channel
2173+
/// Information about pending attempts at funding a channel. This includes funding currently under
2174+
/// negotiation and any negotiated attempts waiting enough on-chain confirmations. More than one
2175+
/// such attempt indicates use of RBF to increase the chances of confirmation.
21742176
#[cfg(splicing)]
2175-
struct PendingSplice {
2177+
struct PendingFunding {
21762178
pub our_funding_contribution: i64,
2179+
2180+
/// The current funding attempt under negotiation. Once signatures have been exchanged, this
2181+
/// will move to `negotiated_candidates`.
21772182
funding: Option<FundingScope>,
21782183

21792184
/// Funding candidates that have been negotiated but have not reached enough confirmations
@@ -2188,7 +2193,7 @@ struct PendingSplice {
21882193
}
21892194

21902195
#[cfg(splicing)]
2191-
impl PendingSplice {
2196+
impl PendingFunding {
21922197
fn check_get_splice_locked<SP: Deref>(
21932198
&mut self, context: &ChannelContext<SP>, confirmed_funding_index: usize, height: u32,
21942199
) -> Option<msgs::SpliceLocked>
@@ -5949,7 +5954,7 @@ where
59495954
holder_commitment_point: HolderCommitmentPoint,
59505955
/// Info about an in-progress, pending splice (if any), on the pre-splice channel
59515956
#[cfg(splicing)]
5952-
pending_splice: Option<PendingSplice>,
5957+
pending_splice: Option<PendingFunding>,
59535958
}
59545959

59555960
#[cfg(splicing)]
@@ -10289,7 +10294,7 @@ where
1028910294
self.context.channel_id(), err,
1029010295
)})?;
1029110296

10292-
self.pending_splice = Some(PendingSplice {
10297+
self.pending_splice = Some(PendingFunding {
1029310298
our_funding_contribution: our_funding_contribution_satoshis,
1029410299
funding: None,
1029510300
negotiated_candidates: vec![],

0 commit comments

Comments
 (0)