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
- Defer creating outbound_scid_alias for a manually accepted channel until the channel is actually accepted. The obviates the need to haul it around in the InboundChannelRequest struct and to clean it up when the channel is rejected.
- Move the InboundChannelRequest struct to channelmanager.rs since it's really just an internal thing to be used there.
return Err(APIError::ChannelUnavailable{ err: format!("Channel with id {} not found for the passed counterparty node_id {}", log_bytes!(*channel_id), peer_node_id) });
@@ -5205,15 +5212,17 @@ where
5205
5212
let peer_state = &mut *peer_state_lock;
5206
5213
let is_only_peer_channel = peer_state.total_channel_count() == 1;
5207
5214
5208
-
// Find (and remove) the channel in the unaccepted table. If it's
5209
-
// not there, something weird is happening and return an error.
5215
+
// Find (and remove) the channel in the unaccepted table. If it's not there, something weird is
5216
+
// happening and return an error. N.B. that we create channel with an outbound SCID of zero so
5217
+
// that we can delay allocating the SCID until after we're sure that the checks below will
5218
+
// succeed.
5210
5219
let mut channel = match peer_state.inbound_channel_request_by_id.remove(temporary_channel_id) {
5211
5220
Some(unaccepted_channel) => {
5212
5221
let best_block_height = self.best_block.read().unwrap().height();
return Err(MsgHandleErrInternal::send_err_msg_no_close("temporary_channel_id collision for the same peer!".to_owned(), msg.temporary_channel_id.clone()));
0 commit comments