@@ -8164,22 +8164,24 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
8164
8164
.and_then(|(funded_chan, monitor)| {
8165
8165
self.chain_monitor
8166
8166
.watch_channel(funded_chan.context.get_funding_txo().unwrap(), monitor)
8167
+ .map(|persist_status| (funded_chan, persist_status))
8167
8168
.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);
8173
8169
ChannelError::close("Channel funding outpoint was a duplicate".to_owned())
8174
8170
})
8175
- .map(|persist_status| (funded_chan, persist_status))
8176
8171
})
8177
8172
{
8178
8173
Ok((funded_chan, persist_status)) => {
8179
8174
handle_new_monitor_update!(self, persist_status, peer_state_lock, peer_state, per_peer_state, funded_chan, INITIAL_MONITOR);
8180
8175
Ok(())
8181
8176
},
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
+ },
8183
8185
}
8184
8186
},
8185
8187
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