@@ -207,6 +207,7 @@ type ShutdownResult = (Option<(OutPoint, ChannelMonitorUpdate)>, Vec<(HTLCSource
207
207
208
208
struct MsgHandleErrInternal {
209
209
err : msgs:: LightningError ,
210
+ chan_id : Option < [ u8 ; 32 ] > ,
210
211
shutdown_finish : Option < ( ShutdownResult , Option < msgs:: ChannelUpdate > ) > ,
211
212
}
212
213
impl MsgHandleErrInternal {
@@ -222,6 +223,7 @@ impl MsgHandleErrInternal {
222
223
} ,
223
224
} ,
224
225
} ,
226
+ chan_id : Some ( channel_id) ,
225
227
shutdown_finish : None ,
226
228
}
227
229
}
@@ -232,12 +234,13 @@ impl MsgHandleErrInternal {
232
234
err,
233
235
action : msgs:: ErrorAction :: IgnoreError ,
234
236
} ,
237
+ chan_id : None ,
235
238
shutdown_finish : None ,
236
239
}
237
240
}
238
241
#[ inline]
239
242
fn from_no_close ( err : msgs:: LightningError ) -> Self {
240
- Self { err, shutdown_finish : None }
243
+ Self { err, chan_id : None , shutdown_finish : None }
241
244
}
242
245
#[ inline]
243
246
fn from_finish_shutdown ( err : String , channel_id : [ u8 ; 32 ] , shutdown_res : ShutdownResult , channel_update : Option < msgs:: ChannelUpdate > ) -> Self {
@@ -251,6 +254,7 @@ impl MsgHandleErrInternal {
251
254
} ,
252
255
} ,
253
256
} ,
257
+ chan_id : Some ( channel_id) ,
254
258
shutdown_finish : Some ( ( shutdown_res, channel_update) ) ,
255
259
}
256
260
}
@@ -281,6 +285,7 @@ impl MsgHandleErrInternal {
281
285
} ,
282
286
} ,
283
287
} ,
288
+ chan_id : Some ( channel_id) ,
284
289
shutdown_finish : None ,
285
290
}
286
291
}
@@ -756,7 +761,7 @@ macro_rules! handle_error {
756
761
( $self: ident, $internal: expr, $counterparty_node_id: expr) => {
757
762
match $internal {
758
763
Ok ( msg) => Ok ( msg) ,
759
- Err ( MsgHandleErrInternal { err, shutdown_finish } ) => {
764
+ Err ( MsgHandleErrInternal { err, chan_id , shutdown_finish } ) => {
760
765
#[ cfg( debug_assertions) ]
761
766
{
762
767
// In testing, ensure there are no deadlocks where the lock is already held upon
0 commit comments