@@ -8164,22 +8164,24 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
81648164 .and_then(|(funded_chan, monitor)| {
81658165 self.chain_monitor
81668166 .watch_channel(funded_chan.context.get_funding_txo().unwrap(), monitor)
8167+ .map(|persist_status| (funded_chan, persist_status))
81678168 .map_err(|()| {
8168- // We weren't able to watch the channel to begin with, so no
8169- // updates should be made on it. Previously, full_stack_target
8170- // found an (unreachable) panic when the monitor update contained
8171- // within `shutdown_finish` was applied.
8172- funded_chan.unset_funding_info(msg.channel_id);
81738169 ChannelError::close("Channel funding outpoint was a duplicate".to_owned())
81748170 })
8175- .map(|persist_status| (funded_chan, persist_status))
81768171 })
81778172 {
81788173 Ok((funded_chan, persist_status)) => {
81798174 handle_new_monitor_update!(self, persist_status, peer_state_lock, peer_state, per_peer_state, funded_chan, INITIAL_MONITOR);
81808175 Ok(())
81818176 },
8182- Err(e) => try_channel_entry!(self, peer_state, Err(e), chan_entry),
8177+ Err(e) => {
8178+ // We weren't able to watch the channel to begin with, so no
8179+ // updates should be made on it. Previously, full_stack_target
8180+ // found an (unreachable) panic when the monitor update contained
8181+ // within `shutdown_finish` was applied.
8182+ chan.unset_funding_info(msg.channel_id);
8183+ try_channel_entry!(self, peer_state, Err(e), chan_entry)
8184+ },
81838185 }
81848186 },
81858187 hash_map::Entry::Vacant(_) => return Err(MsgHandleErrInternal::send_err_msg_no_close("Failed to find corresponding channel".to_owned(), msg.channel_id))
0 commit comments