@@ -3260,7 +3260,7 @@ macro_rules! convert_channel_err {
3260
3260
convert_channel_err!($self, $peer_state, reason, $funded_channel, do_close, locked_close, $channel_id, _internal);
3261
3261
err.dont_send_error_message();
3262
3262
debug_assert!(close);
3263
- (close, err)
3263
+ err
3264
3264
} };
3265
3265
($self: ident, $peer_state: expr, $err: expr, $funded_channel: expr, $channel_id: expr, FUNDED_CHANNEL) => { {
3266
3266
let mut do_close = |reason| {
@@ -9767,7 +9767,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
9767
9767
// also implies there are no pending HTLCs left on the channel, so we can
9768
9768
// fully delete it from tracking (the channel monitor is still around to
9769
9769
// watch for old state broadcasts)!
9770
- let (_, err) = convert_channel_err!(self, peer_state, close_res, chan, &msg.channel_id, COOP_CLOSED);
9770
+ let err = convert_channel_err!(self, peer_state, close_res, chan, &msg.channel_id, COOP_CLOSED);
9771
9771
chan_entry.remove();
9772
9772
Some((tx, Err(err)))
9773
9773
} else {
@@ -11053,16 +11053,17 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
11053
11053
Some((_, channel_id)) if chan.context().channel_id() != channel_id => None,
11054
11054
_ => unblock_chan(chan, &mut peer_state.pending_msg_events),
11055
11055
};
11056
- if let Some(shutdown_res ) = shutdown_result {
11056
+ if let Some(shutdown ) = shutdown_result {
11057
11057
let context = chan.context();
11058
11058
let logger = WithChannelContext::from(&self.logger, context, None);
11059
11059
let chan_id = context.channel_id();
11060
11060
log_trace!(logger, "Removing channel {} now that the signer is unblocked", chan_id);
11061
- let (remove, err) = if let Some(funded_channel) = chan.as_funded_mut() {
11062
- convert_channel_err!(self, peer_state, shutdown_res, funded_channel, &chan_id, COOP_CLOSED)
11061
+ let (remove, err) = if let Some(funded) = chan.as_funded_mut() {
11062
+ let err = convert_channel_err!(self, peer_state, shutdown, funded, &chan_id, COOP_CLOSED);
11063
+ (true, err)
11063
11064
} else {
11064
11065
debug_assert!(false);
11065
- let reason = shutdown_res .closure_reason.clone();
11066
+ let reason = shutdown .closure_reason.clone();
11066
11067
let err = ChannelError::Close((reason.to_string(), reason));
11067
11068
convert_channel_err!(self, peer_state, err, chan, &chan_id, UNFUNDED_CHANNEL)
11068
11069
};
@@ -11110,7 +11111,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
11110
11111
if let Some((tx, shutdown_res)) = tx_shutdown_result_opt {
11111
11112
// We're done with this channel. We got a closing_signed and sent back
11112
11113
// a closing_signed with a closing transaction to broadcast.
11113
- let (_, err) = convert_channel_err!(self, peer_state, shutdown_res, funded_chan, channel_id, COOP_CLOSED);
11114
+ let err = convert_channel_err!(self, peer_state, shutdown_res, funded_chan, channel_id, COOP_CLOSED);
11114
11115
handle_errors.push((*cp_id, Err(err)));
11115
11116
11116
11117
log_info!(logger, "Broadcasting {}", log_tx!(tx));
0 commit comments