Skip to content

Commit

Permalink
Remove tcp as tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
ryardley committed Nov 22, 2024
1 parent c631f94 commit 15f72ed
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 158 deletions.
145 changes: 0 additions & 145 deletions packages/ciphernode/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions packages/ciphernode/p2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@ libp2p = { workspace = true, features = [
"kad",
"macros",
"mdns",
"noise",
"ping",
"quic",
"tcp",
"tokio",
"yamux",
] }
tokio = { workspace = true, features = ["full"] }
tracing = { workspace = true }
Expand Down
12 changes: 2 additions & 10 deletions packages/ciphernode/p2p/src/libp2p_router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use libp2p::{
identity, kad::store::MemoryStore, kad::Behaviour as KademliaBehaviour,
swarm::NetworkBehaviour, swarm::SwarmEvent,
};
use libp2p::{identify, mdns, noise, tcp, yamux};
use libp2p::{identify, mdns};
use std::collections::hash_map::DefaultHasher;
use std::error::Error;
use std::hash::{Hash, Hasher};
Expand Down Expand Up @@ -83,11 +83,6 @@ impl EnclaveRouter {
|id| libp2p::SwarmBuilder::with_existing_identity(id),
)
.with_tokio()
.with_tcp(
tcp::Config::default(),
noise::Config::new,
yamux::Config::default,
)?
.with_quic()
.with_behaviour(|key| {
let gossipsub = gossipsub::Behaviour::new(
Expand Down Expand Up @@ -135,10 +130,7 @@ impl EnclaveRouter {
.as_mut()
.unwrap()
.listen_on("/ip4/0.0.0.0/udp/0/quic-v1".parse()?)?;
self.swarm
.as_mut()
.unwrap()
.listen_on("/ip4/0.0.0.0/tcp/0".parse()?)?;

loop {
select! {
Some(line) = self.cmd_rx.recv() => {
Expand Down

0 comments on commit 15f72ed

Please sign in to comment.