@@ -4272,7 +4272,9 @@ where
42724272 /// After completion of splicing, the funding transaction will be replaced by a new one, spending the old funding transaction,
42734273 /// with optional extra inputs (splice-in) and/or extra outputs (splice-out or change).
42744274 /// TODO(splicing): Implementation is currently incomplete.
4275+ ///
42754276 /// Note: Currently only splice-in is supported (increase in channel capacity), splice-out is not.
4277+ ///
42764278 /// - our_funding_contribution_satoshis: the amount contributed by us to the channel. This will increase our channel balance.
42774279 /// - our_funding_inputs: the funding inputs provided by us. If our contribution is positive, our funding inputs must cover at least that amount.
42784280 /// Includes the witness weight for this input (e.g. P2WPKH_WITNESS_WEIGHT=109 for typical P2WPKH inputs).
@@ -9499,17 +9501,11 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
94999501 ), msg.channel_id)),
95009502 hash_map::Entry::Occupied(mut chan_entry) => {
95019503 if let Some(chan) = chan_entry.get_mut().as_funded_mut() {
9502- match chan.splice_init(msg) {
9503- Ok(splice_ack_msg) => {
9504- peer_state.pending_msg_events.push(events::MessageSendEvent::SendSpliceAck {
9505- node_id: *counterparty_node_id,
9506- msg: splice_ack_msg,
9507- });
9508- },
9509- Err(err) => {
9510- try_channel_entry!(self, peer_state, Err(err), chan_entry)
9511- }
9512- }
9504+ let splice_ack_msg = try_channel_entry!(self, peer_state, chan.splice_init(msg), chan_entry);
9505+ peer_state.pending_msg_events.push(events::MessageSendEvent::SendSpliceAck {
9506+ node_id: *counterparty_node_id,
9507+ msg: splice_ack_msg,
9508+ });
95139509 } else {
95149510 return Err(MsgHandleErrInternal::send_err_msg_no_close("Channel is not funded, cannot be spliced".to_owned(), msg.channel_id));
95159511 }
@@ -9544,12 +9540,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
95449540 ), msg.channel_id)),
95459541 hash_map::Entry::Occupied(mut chan_entry) => {
95469542 if let Some(chan) = chan_entry.get_mut().as_funded_mut() {
9547- match chan.splice_ack(msg) {
9548- Ok(_) => {}
9549- Err(err) => {
9550- try_channel_entry!(self, peer_state, Err(err), chan_entry)
9551- }
9552- }
9543+ try_channel_entry!(self, peer_state, chan.splice_ack(msg), chan_entry);
95539544 } else {
95549545 return Err(MsgHandleErrInternal::send_err_msg_no_close("Channel is not funded, cannot splice".to_owned(), msg.channel_id));
95559546 }
@@ -11724,7 +11715,7 @@ where
1172411715 let persist = match &res {
1172511716 Err(e) if e.closes_channel() => NotifyOption::DoPersist,
1172611717 Err(_) => NotifyOption::SkipPersistHandleEvents,
11727- Ok(()) => NotifyOption::SkipPersistNoEvents ,
11718+ Ok(()) => NotifyOption::SkipPersistHandleEvents ,
1172811719 };
1172911720 let _ = handle_error!(self, res, counterparty_node_id);
1173011721 persist
@@ -11738,7 +11729,7 @@ where
1173811729 let persist = match &res {
1173911730 Err(e) if e.closes_channel() => NotifyOption::DoPersist,
1174011731 Err(_) => NotifyOption::SkipPersistHandleEvents,
11741- Ok(()) => NotifyOption::SkipPersistNoEvents ,
11732+ Ok(()) => NotifyOption::SkipPersistHandleEvents ,
1174211733 };
1174311734 let _ = handle_error!(self, res, counterparty_node_id);
1174411735 persist
0 commit comments