@@ -4285,7 +4285,9 @@ where
4285
4285
/// After completion of splicing, the funding transaction will be replaced by a new one, spending the old funding transaction,
4286
4286
/// with optional extra inputs (splice-in) and/or extra outputs (splice-out or change).
4287
4287
/// TODO(splicing): Implementation is currently incomplete.
4288
+ ///
4288
4289
/// Note: Currently only splice-in is supported (increase in channel capacity), splice-out is not.
4290
+ ///
4289
4291
/// - our_funding_contribution_satoshis: the amount contributed by us to the channel. This will increase our channel balance.
4290
4292
/// - our_funding_inputs: the funding inputs provided by us. If our contribution is positive, our funding inputs must cover at least that amount.
4291
4293
/// 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/
9566
9568
), msg.channel_id)),
9567
9569
hash_map::Entry::Occupied(mut chan_entry) => {
9568
9570
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
+ });
9580
9576
} else {
9581
9577
return Err(MsgHandleErrInternal::send_err_msg_no_close("Channel is not funded, cannot be spliced".to_owned(), msg.channel_id));
9582
9578
}
@@ -9611,12 +9607,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
9611
9607
), msg.channel_id)),
9612
9608
hash_map::Entry::Occupied(mut chan_entry) => {
9613
9609
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);
9620
9611
} else {
9621
9612
return Err(MsgHandleErrInternal::send_err_msg_no_close("Channel is not funded, cannot splice".to_owned(), msg.channel_id));
9622
9613
}
@@ -11917,7 +11908,7 @@ where
11917
11908
let persist = match &res {
11918
11909
Err(e) if e.closes_channel() => NotifyOption::DoPersist,
11919
11910
Err(_) => NotifyOption::SkipPersistHandleEvents,
11920
- Ok(()) => NotifyOption::SkipPersistNoEvents ,
11911
+ Ok(()) => NotifyOption::SkipPersistHandleEvents ,
11921
11912
};
11922
11913
let _ = handle_error!(self, res, counterparty_node_id);
11923
11914
persist
@@ -11931,7 +11922,7 @@ where
11931
11922
let persist = match &res {
11932
11923
Err(e) if e.closes_channel() => NotifyOption::DoPersist,
11933
11924
Err(_) => NotifyOption::SkipPersistHandleEvents,
11934
- Ok(()) => NotifyOption::SkipPersistNoEvents ,
11925
+ Ok(()) => NotifyOption::SkipPersistHandleEvents ,
11935
11926
};
11936
11927
let _ = handle_error!(self, res, counterparty_node_id);
11937
11928
persist
0 commit comments