@@ -4273,7 +4273,9 @@ where
42734273 /// After completion of splicing, the funding transaction will be replaced by a new one, spending the old funding transaction,
42744274 /// with optional extra inputs (splice-in) and/or extra outputs (splice-out or change).
42754275 /// TODO(splicing): Implementation is currently incomplete.
4276+ ///
42764277 /// Note: Currently only splice-in is supported (increase in channel capacity), splice-out is not.
4278+ ///
42774279 /// - our_funding_contribution_satoshis: the amount contributed by us to the channel. This will increase our channel balance.
42784280 /// - our_funding_inputs: the funding inputs provided by us. If our contribution is positive, our funding inputs must cover at least that amount.
42794281 /// Includes the witness weight for this input (e.g. P2WPKH_WITNESS_WEIGHT=109 for typical P2WPKH inputs).
@@ -9500,17 +9502,11 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
95009502 ), msg.channel_id)),
95019503 hash_map::Entry::Occupied(mut chan_entry) => {
95029504 if let Some(chan) = chan_entry.get_mut().as_funded_mut() {
9503- match chan.splice_init(msg) {
9504- Ok(splice_ack_msg) => {
9505- peer_state.pending_msg_events.push(events::MessageSendEvent::SendSpliceAck {
9506- node_id: *counterparty_node_id,
9507- msg: splice_ack_msg,
9508- });
9509- },
9510- Err(err) => {
9511- try_channel_entry!(self, peer_state, Err(err), chan_entry)
9512- }
9513- }
9505+ let splice_ack_msg = try_channel_entry!(self, peer_state, chan.splice_init(msg), chan_entry);
9506+ peer_state.pending_msg_events.push(events::MessageSendEvent::SendSpliceAck {
9507+ node_id: *counterparty_node_id,
9508+ msg: splice_ack_msg,
9509+ });
95149510 } else {
95159511 return Err(MsgHandleErrInternal::send_err_msg_no_close("Channel is not funded, cannot be spliced".to_owned(), msg.channel_id));
95169512 }
@@ -9545,12 +9541,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
95459541 ), msg.channel_id)),
95469542 hash_map::Entry::Occupied(mut chan_entry) => {
95479543 if let Some(chan) = chan_entry.get_mut().as_funded_mut() {
9548- match chan.splice_ack(msg) {
9549- Ok(_) => {}
9550- Err(err) => {
9551- try_channel_entry!(self, peer_state, Err(err), chan_entry)
9552- }
9553- }
9544+ try_channel_entry!(self, peer_state, chan.splice_ack(msg), chan_entry);
95549545 } else {
95559546 return Err(MsgHandleErrInternal::send_err_msg_no_close("Channel is not funded, cannot splice".to_owned(), msg.channel_id));
95569547 }
@@ -11725,7 +11716,7 @@ where
1172511716 let persist = match &res {
1172611717 Err(e) if e.closes_channel() => NotifyOption::DoPersist,
1172711718 Err(_) => NotifyOption::SkipPersistHandleEvents,
11728- Ok(()) => NotifyOption::SkipPersistNoEvents ,
11719+ Ok(()) => NotifyOption::SkipPersistHandleEvents ,
1172911720 };
1173011721 let _ = handle_error!(self, res, counterparty_node_id);
1173111722 persist
@@ -11739,7 +11730,7 @@ where
1173911730 let persist = match &res {
1174011731 Err(e) if e.closes_channel() => NotifyOption::DoPersist,
1174111732 Err(_) => NotifyOption::SkipPersistHandleEvents,
11742- Ok(()) => NotifyOption::SkipPersistNoEvents ,
11733+ Ok(()) => NotifyOption::SkipPersistHandleEvents ,
1174311734 };
1174411735 let _ = handle_error!(self, res, counterparty_node_id);
1174511736 persist
0 commit comments