Skip to content

Commit e9f6695

Browse files
committed
removed is_duplicate from session container
1 parent 809d80d commit e9f6695

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

crates/net/network-devp2p/src/session_container.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -406,23 +406,4 @@ impl SessionContainer {
406406

407407
return None;
408408
}
409-
410-
// makes a shallow search if there is already a session for that connection
411-
fn is_duplicate(&self, session: &SharedSession) -> bool {
412-
let (id, token) = {
413-
let lock = session.lock();
414-
(lock.id().cloned(), lock.token().clone())
415-
};
416-
417-
if let Some(node_id) = id {
418-
if let Some(existing_peer_id) = self.node_id_to_peer_id(&node_id, true) {
419-
if existing_peer_id != token {
420-
trace!(target: "network", "Session {token} has a duplicate :{existing_peer_id} {node_id}");
421-
return true;
422-
}
423-
}
424-
} // else we dont have enough information to make a decision.
425-
426-
return false;
427-
}
428409
}

0 commit comments

Comments
 (0)