Skip to content

Commit 653d004

Browse files
committed
f cleaner check
1 parent b6a9e0f commit 653d004

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lightning/src/ln/peer_handler.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -1156,12 +1156,10 @@ impl<Descriptor: SocketDescriptor, CM: Deref, RM: Deref, OM: Deref, L: Deref, CM
11561156
hash_map::Entry::Occupied(e) => {
11571157
log_trace!(self.logger, "Got second connection with {}, closing", log_pubkey!(peer.their_node_id.unwrap().0));
11581158
peer.their_node_id = None; // Unset so that we don't generate a peer_disconnected event
1159-
#[cfg(debug_assertions)] {
1160-
// Check that the peers map is consistent with the
1161-
// node_id_to_descriptor map, as this has been broken
1162-
// before.
1163-
peers.get(e.get()).unwrap();
1164-
}
1159+
// Check that the peers map is consistent with the
1160+
// node_id_to_descriptor map, as this has been broken
1161+
// before.
1162+
debug_assert!(peers.get(e.get()).is_some());
11651163
return Err(PeerHandleError { })
11661164
},
11671165
hash_map::Entry::Vacant(entry) => {

0 commit comments

Comments
 (0)