You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Handle sign_counterparty_commitment failing during inb funding
If sign_counterparty_commitment fails (i.e. because the signer is
temporarily disconnected), this really indicates that we should
retry the message sending which required the signature later,
rather than force-closing the channel (which probably won't even
work if the signer is missing).
Here we add initial handling of sign_counterparty_commitment
failing during inbound channel funding, setting a flag in
`ChannelContext` which indicates we should retry sending the
`funding_signed` later. We don't yet add any ability to do that
retry.
Copy file name to clipboardExpand all lines: lightning/src/ln/channelmanager.rs
+14-9Lines changed: 14 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -5626,7 +5626,7 @@ where
5626
5626
5627
5627
let mut peer_state_lock = peer_state_mutex.lock().unwrap();
5628
5628
let peer_state = &mut *peer_state_lock;
5629
-
let (chan, funding_msg, monitor) =
5629
+
let (chan, funding_msg_opt, monitor) =
5630
5630
match peer_state.inbound_v1_channel_by_id.remove(&msg.temporary_channel_id) {
5631
5631
Some(inbound_chan) => {
5632
5632
match inbound_chan.funding_created(msg, best_block, &self.signer_provider, &self.logger) {
@@ -5646,16 +5646,19 @@ where
5646
5646
None => return Err(MsgHandleErrInternal::send_err_msg_no_close(format!("Got a message for a channel from the wrong node! No such channel for the passed counterparty_node_id {}", counterparty_node_id), msg.temporary_channel_id))
5647
5647
};
5648
5648
5649
-
match peer_state.channel_by_id.entry(funding_msg.channel_id) {
5649
+
match peer_state.channel_by_id.entry(chan.context.channel_id()) {
5650
5650
hash_map::Entry::Occupied(_) => {
5651
-
Err(MsgHandleErrInternal::send_err_msg_no_close("Already had channel with the new channel_id".to_owned(), funding_msg.channel_id))
5651
+
Err(MsgHandleErrInternal::send_err_msg_no_close(
5652
+
"Already had channel with the new channel_id".to_owned(),
5653
+
chan.context.channel_id()
5654
+
))
5652
5655
},
5653
5656
hash_map::Entry::Vacant(e) => {
5654
5657
match self.id_to_peer.lock().unwrap().entry(chan.context.channel_id()) {
0 commit comments