Skip to content

Commit 9bbdf58

Browse files
committed
Expand documentation of splice_channel
1 parent 1316d2a commit 9bbdf58

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lightning/src/ln/channelmanager.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -4119,7 +4119,12 @@ where
41194119
}
41204120

41214121
/// Initiate a splice, to change the channel capacity of an existing funded channel.
4122-
/// TODO(splicing): Expand documentation
4122+
/// After completion of splicing, the funding transaction will be replaced by a new one, spending the old funding transaction,
4123+
/// with optional extra inputs (splice-in) and/or extra outputs (splice-out or change).
4124+
/// TODO(splicing): Implementation is currently incomplete.
4125+
/// Note: Currently only splice-in is supported (increase in channel capacity), splice-out is not.
4126+
/// - our_funding_contribution_satoshis: the amount contributed by us to the channel. This will increase our channel balance.
4127+
/// - our_funding_inputs: the funding inputs provided by us. If our contribution is positive, our funding inputs must cover at most that amount.
41234128
#[cfg(splicing)]
41244129
pub fn splice_channel(
41254130
&self, channel_id: &ChannelId, counterparty_node_id: &PublicKey, our_funding_contribution_satoshis: i64,
@@ -9354,8 +9359,7 @@ where
93549359
/// Handle incoming splice request, transition channel to splice-pending (unless some check fails).
93559360
#[cfg(splicing)]
93569361
fn internal_splice_init(&self, counterparty_node_id: &PublicKey, msg: &msgs::SpliceInit) -> Result<(), MsgHandleErrInternal> {
9357-
// TODO(splicing): checks
9358-
// TODO(splicing): if we accept splicing, quiscence
9362+
// TODO(splicing): if we accept splicing, quiescence
93599363

93609364
let per_peer_state = self.per_peer_state.read().unwrap();
93619365
let peer_state_mutex = per_peer_state.get(counterparty_node_id)
@@ -9402,9 +9406,6 @@ where
94029406
/// Handle incoming splice request ack, transition channel to splice-pending (unless some check fails).
94039407
#[cfg(splicing)]
94049408
fn internal_splice_ack(&self, counterparty_node_id: &PublicKey, msg: &msgs::SpliceAck) -> Result<(), MsgHandleErrInternal> {
9405-
// TODO(splicing): checks
9406-
// TODO(splicing): check if we have initiated splicing
9407-
94089409
let per_peer_state = self.per_peer_state.read().unwrap();
94099410
let peer_state_mutex = per_peer_state.get(counterparty_node_id)
94109411
.ok_or_else(|| {

0 commit comments

Comments
 (0)