Skip to content

Commit e47fc06

Browse files
f - Only hold id_to_peer lock temporarily on removal 2
1 parent 743e6e1 commit e47fc06

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,10 +1266,7 @@ macro_rules! handle_error {
12661266
macro_rules! update_maps_on_chan_removal {
12671267
($self: expr, $channel: expr) => {
12681268
{
1269-
let mut id_to_peer = $self.id_to_peer.lock().unwrap();
1270-
id_to_peer.remove(&$channel.channel_id());
1271-
}
1272-
{
1269+
$self.id_to_peer.lock().unwrap().remove(&$channel.channel_id());
12731270
let mut short_to_chan_info = $self.short_to_chan_info.write().unwrap();
12741271
if let Some(short_id) = $channel.get_short_channel_id() {
12751272
short_to_chan_info.remove(&short_id);

0 commit comments

Comments
 (0)