Skip to content

Commit 372f426

Browse files
committed
Minor comment/TODO/typo changes (review)
1 parent c6d8076 commit 372f426

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

lightning/src/ln/channel.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4347,7 +4347,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
43474347
funding_feerate_per_kw: u32, locktime: u32,
43484348
) -> msgs::SpliceInit {
43494349
// Reuse the existing funding pubkey, in spite of the channel value changing
4350-
// (though at this point we don't know the new value yet, due tue the optional counterparty contribution)
4350+
// (though at this point we don't know the new value yet, due to the optional counterparty contribution)
43514351
// Note that channel_keys_id is supposed NOT to change
43524352
let funding_pubkey = self.get_holder_pubkeys().funding_pubkey.clone();
43534353
msgs::SpliceInit {
@@ -8119,7 +8119,7 @@ impl<SP: Deref> FundedChannel<SP> where
81198119
our_funding_inputs: Vec<(TxIn, Transaction)>, funding_feerate_per_kw: u32, locktime: u32,
81208120
) -> Result<msgs::SpliceInit, ChannelError> {
81218121
// Check if a splice has been initiated already.
8122-
// Note: this could be handled more nicely, and support multiple outstanding splice's, the incoming splice_ack matters anyways.
8122+
// Note: only a single outstanding splice is supported (per spec)
81238123
if let Some(splice_info) = &self.pending_splice_pre {
81248124
return Err(ChannelError::Warn(format!(
81258125
"Channel has already a splice pending, contribution {}", splice_info.our_funding_contribution
@@ -8130,6 +8130,8 @@ impl<SP: Deref> FundedChannel<SP> where
81308130
return Err(ChannelError::Warn(format!("Cannot initiate splicing, as channel is not Ready")));
81318131
}
81328132

8133+
// TODO(splicing): check for quiescence
8134+
81338135
let pre_channel_value = self.context.get_value_satoshis();
81348136
// Sanity check: capacity cannot decrease below 0
81358137
if (pre_channel_value as i64).saturating_add(our_funding_contribution_satoshis) < 0 {
@@ -8146,7 +8148,7 @@ impl<SP: Deref> FundedChannel<SP> where
81468148
)));
81478149
}
81488150

8149-
// Note: post-splice channel value is not yet known at this point, counterpary contribution is not known
8151+
// Note: post-splice channel value is not yet known at this point, counterparty contribution is not known
81508152
// (Cannot test for miminum required post-splice channel value)
81518153

81528154
// Check that inputs are sufficient to cover our contribution

lightning/src/ln/channelmanager.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11557,6 +11557,7 @@ where
1155711557
msg.channel_id)), counterparty_node_id);
1155811558
}
1155911559

11560+
/// TODO(splicing): Implement persisting
1156011561
#[cfg(splicing)]
1156111562
fn handle_splice_init(&self, counterparty_node_id: PublicKey, msg: &msgs::SpliceInit) {
1156211563
let _persistence_guard = PersistenceNotifierGuard::optionally_notify(self, || {
@@ -11571,6 +11572,7 @@ where
1157111572
});
1157211573
}
1157311574

11575+
/// TODO(splicing): Implement persisting
1157411576
#[cfg(splicing)]
1157511577
fn handle_splice_ack(&self, counterparty_node_id: PublicKey, msg: &msgs::SpliceAck) {
1157611578
let _persistence_guard = PersistenceNotifierGuard::optionally_notify(self, || {

0 commit comments

Comments
 (0)