Skip to content

Commit dcf7ef8

Browse files
committed
Minor comment/TODO/typo changes (review)
1 parent 5feff58 commit dcf7ef8

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
@@ -4597,7 +4597,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
45974597
funding_feerate_per_kw: u32, locktime: u32,
45984598
) -> msgs::SpliceInit {
45994599
// Reuse the existing funding pubkey, in spite of the channel value changing
4600-
// (though at this point we don't know the new value yet, due tue the optional counterparty contribution)
4600+
// (though at this point we don't know the new value yet, due to the optional counterparty contribution)
46014601
// Note that channel_keys_id is supposed NOT to change
46024602
let funding_pubkey = self.get_holder_pubkeys().funding_pubkey.clone();
46034603
msgs::SpliceInit {
@@ -8370,7 +8370,7 @@ impl<SP: Deref> FundedChannel<SP> where
83708370
our_funding_inputs: Vec<(TxIn, Transaction)>, funding_feerate_per_kw: u32, locktime: u32,
83718371
) -> Result<msgs::SpliceInit, ChannelError> {
83728372
// Check if a splice has been initiated already.
8373-
// Note: this could be handled more nicely, and support multiple outstanding splice's, the incoming splice_ack matters anyways.
8373+
// Note: only a single outstanding splice is supported (per spec)
83748374
if let Some(splice_info) = &self.pending_splice_pre {
83758375
return Err(ChannelError::Warn(format!(
83768376
"Channel has already a splice pending, contribution {}", splice_info.our_funding_contribution
@@ -8381,6 +8381,8 @@ impl<SP: Deref> FundedChannel<SP> where
83818381
return Err(ChannelError::Warn(format!("Cannot initiate splicing, as channel is not Ready")));
83828382
}
83838383

8384+
// TODO(splicing): check for quiescence
8385+
83848386
let pre_channel_value = self.funding.get_value_satoshis();
83858387
// Sanity check: capacity cannot decrease below 0
83868388
if (pre_channel_value as i64).saturating_add(our_funding_contribution_satoshis) < 0 {
@@ -8397,7 +8399,7 @@ impl<SP: Deref> FundedChannel<SP> where
83978399
)));
83988400
}
83998401

8400-
// Note: post-splice channel value is not yet known at this point, counterpary contribution is not known
8402+
// Note: post-splice channel value is not yet known at this point, counterparty contribution is not known
84018403
// (Cannot test for miminum required post-splice channel value)
84028404

84038405
// 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
@@ -11889,6 +11889,7 @@ where
1188911889
});
1189011890
}
1189111891

11892+
/// TODO(splicing): Implement persisting
1189211893
#[cfg(splicing)]
1189311894
fn handle_splice_init(&self, counterparty_node_id: PublicKey, msg: &msgs::SpliceInit) {
1189411895
let _persistence_guard = PersistenceNotifierGuard::optionally_notify(self, || {
@@ -11903,6 +11904,7 @@ where
1190311904
});
1190411905
}
1190511906

11907+
/// TODO(splicing): Implement persisting
1190611908
#[cfg(splicing)]
1190711909
fn handle_splice_ack(&self, counterparty_node_id: PublicKey, msg: &msgs::SpliceAck) {
1190811910
let _persistence_guard = PersistenceNotifierGuard::optionally_notify(self, || {

0 commit comments

Comments
 (0)