Skip to content

Commit 117f30a

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 f5fde96 commit 117f30a

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
@@ -2173,10 +2173,15 @@ impl FundingScope {
21732173
}
21742174
}
21752175

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

21822187
/// Funding candidates that have been negotiated but have not reached enough confirmations
@@ -2191,7 +2196,7 @@ struct PendingSplice {
21912196
}
21922197

21932198
#[cfg(splicing)]
2194-
impl PendingSplice {
2199+
impl PendingFunding {
21952200
fn check_get_splice_locked<SP: Deref>(
21962201
&mut self, context: &ChannelContext<SP>, confirmed_funding_index: usize, height: u32,
21972202
) -> Option<msgs::SpliceLocked>
@@ -5903,7 +5908,7 @@ where
59035908
holder_commitment_point: HolderCommitmentPoint,
59045909
/// Info about an in-progress, pending splice (if any), on the pre-splice channel
59055910
#[cfg(splicing)]
5906-
pending_splice: Option<PendingSplice>,
5911+
pending_splice: Option<PendingFunding>,
59075912
}
59085913

59095914
#[cfg(splicing)]
@@ -10267,7 +10272,7 @@ where
1026710272
self.context.channel_id(), err,
1026810273
)})?;
1026910274

10270-
self.pending_splice = Some(PendingSplice {
10275+
self.pending_splice = Some(PendingFunding {
1027110276
our_funding_contribution: our_funding_contribution_satoshis,
1027210277
funding: None,
1027310278
negotiated_candidates: vec![],

0 commit comments

Comments
 (0)