File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1261,8 +1261,10 @@ macro_rules! handle_error {
1261
1261
1262
1262
macro_rules! update_maps_on_chan_removal {
1263
1263
( $self: expr, $channel: expr) => {
1264
- // The lockorder for id_to_peer is prior to short_to_chan_info.
1265
- let mut id_to_peer = $self. id_to_peer. lock( ) . unwrap( ) ;
1264
+ {
1265
+ let mut id_to_peer = $self. id_to_peer. lock( ) . unwrap( ) ;
1266
+ id_to_peer. remove( & $channel. channel_id( ) ) ;
1267
+ }
1266
1268
let mut short_to_chan_info = $self. short_to_chan_info. write( ) . unwrap( ) ;
1267
1269
if let Some ( short_id) = $channel. get_short_channel_id( ) {
1268
1270
short_to_chan_info. remove( & short_id) ;
@@ -1276,7 +1278,6 @@ macro_rules! update_maps_on_chan_removal {
1276
1278
let alias_removed = $self. outbound_scid_aliases. lock( ) . unwrap( ) . remove( & $channel. outbound_scid_alias( ) ) ;
1277
1279
debug_assert!( alias_removed) ;
1278
1280
}
1279
- id_to_peer. remove( & $channel. channel_id( ) ) ;
1280
1281
short_to_chan_info. remove( & $channel. outbound_scid_alias( ) ) ;
1281
1282
}
1282
1283
}
You can’t perform that action at this time.
0 commit comments