@@ -4285,7 +4285,9 @@ where
42854285 /// After completion of splicing, the funding transaction will be replaced by a new one, spending the old funding transaction,
42864286 /// with optional extra inputs (splice-in) and/or extra outputs (splice-out or change).
42874287 /// TODO(splicing): Implementation is currently incomplete.
4288+ ///
42884289 /// Note: Currently only splice-in is supported (increase in channel capacity), splice-out is not.
4290+ ///
42894291 /// - our_funding_contribution_satoshis: the amount contributed by us to the channel. This will increase our channel balance.
42904292 /// - our_funding_inputs: the funding inputs provided by us. If our contribution is positive, our funding inputs must cover at least that amount.
42914293 /// Includes the witness weight for this input (e.g. P2WPKH_WITNESS_WEIGHT=109 for typical P2WPKH inputs).
@@ -9566,17 +9568,11 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
95669568 ), msg.channel_id)),
95679569 hash_map::Entry::Occupied(mut chan_entry) => {
95689570 if let Some(chan) = chan_entry.get_mut().as_funded_mut() {
9569- match chan.splice_init(msg) {
9570- Ok(splice_ack_msg) => {
9571- peer_state.pending_msg_events.push(events::MessageSendEvent::SendSpliceAck {
9572- node_id: *counterparty_node_id,
9573- msg: splice_ack_msg,
9574- });
9575- },
9576- Err(err) => {
9577- try_channel_entry!(self, peer_state, Err(err), chan_entry)
9578- }
9579- }
9571+ let splice_ack_msg = try_channel_entry!(self, peer_state, chan.splice_init(msg), chan_entry);
9572+ peer_state.pending_msg_events.push(events::MessageSendEvent::SendSpliceAck {
9573+ node_id: *counterparty_node_id,
9574+ msg: splice_ack_msg,
9575+ });
95809576 } else {
95819577 return Err(MsgHandleErrInternal::send_err_msg_no_close("Channel is not funded, cannot be spliced".to_owned(), msg.channel_id));
95829578 }
@@ -9611,12 +9607,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
96119607 ), msg.channel_id)),
96129608 hash_map::Entry::Occupied(mut chan_entry) => {
96139609 if let Some(chan) = chan_entry.get_mut().as_funded_mut() {
9614- match chan.splice_ack(msg) {
9615- Ok(_) => {}
9616- Err(err) => {
9617- try_channel_entry!(self, peer_state, Err(err), chan_entry)
9618- }
9619- }
9610+ try_channel_entry!(self, peer_state, chan.splice_ack(msg), chan_entry);
96209611 } else {
96219612 return Err(MsgHandleErrInternal::send_err_msg_no_close("Channel is not funded, cannot splice".to_owned(), msg.channel_id));
96229613 }
@@ -11917,7 +11908,7 @@ where
1191711908 let persist = match &res {
1191811909 Err(e) if e.closes_channel() => NotifyOption::DoPersist,
1191911910 Err(_) => NotifyOption::SkipPersistHandleEvents,
11920- Ok(()) => NotifyOption::SkipPersistNoEvents ,
11911+ Ok(()) => NotifyOption::SkipPersistHandleEvents ,
1192111912 };
1192211913 let _ = handle_error!(self, res, counterparty_node_id);
1192311914 persist
@@ -11931,7 +11922,7 @@ where
1193111922 let persist = match &res {
1193211923 Err(e) if e.closes_channel() => NotifyOption::DoPersist,
1193311924 Err(_) => NotifyOption::SkipPersistHandleEvents,
11934- Ok(()) => NotifyOption::SkipPersistNoEvents ,
11925+ Ok(()) => NotifyOption::SkipPersistHandleEvents ,
1193511926 };
1193611927 let _ = handle_error!(self, res, counterparty_node_id);
1193711928 persist
0 commit comments