Skip to content

Commit

Permalink
More references use relative location.
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowred committed Mar 4, 2023
1 parent f7d813d commit eef07e9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
9 changes: 0 additions & 9 deletions examples/rendezvous/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,3 @@ futures = "0.3.26"
libp2p = { path = "../../", features = ["async-std", "identify", "macros", "mplex", "noise", "ping", "rendezvous", "tcp", "tokio", "yamux"] }
log = "0.4"
tokio = { version = "1.25", features = [ "rt-multi-thread", "macros", "time" ] }

[[bin]]
name = "rzv-discover"

[[bin]]
name = "rzv-register"

[[bin]]
name = "rzv-identify"
4 changes: 2 additions & 2 deletions examples/rendezvous/src/bin/rzv-identify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use libp2p::{
core::transport::upgrade::Version,
identify, identity, ping, rendezvous,
swarm::{keep_alive, NetworkBehaviour, Swarm, SwarmEvent},
Multiaddr, PeerId, Transport,
tcp, Multiaddr, PeerId, Transport,
};
use std::time::Duration;

Expand All @@ -38,7 +38,7 @@ async fn main() {
.unwrap();

let mut swarm = Swarm::with_tokio_executor(
libp2p::tcp::tokio::Transport::default()
tcp::tokio::Transport::default()
.upgrade(Version::V1)
.authenticate(libp2p::noise::NoiseAuthenticated::xx(&key_pair).unwrap())
.multiplex(libp2p::yamux::YamuxConfig::default())
Expand Down
10 changes: 5 additions & 5 deletions examples/rendezvous/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
use futures::StreamExt;
use libp2p::{
core::transport::upgrade::Version,
identify, identity, ping, rendezvous,
identify, identity, noise, ping, rendezvous,
swarm::{keep_alive, NetworkBehaviour, Swarm, SwarmEvent},
PeerId, Transport,
tcp, yamux, PeerId, Transport,
};
use std::time::Duration;

Expand All @@ -52,10 +52,10 @@ async fn main() {
let key_pair = identity::Keypair::generate_ed25519();

let mut swarm = Swarm::with_tokio_executor(
libp2p::tcp::tokio::Transport::default()
tcp::tokio::Transport::default()
.upgrade(Version::V1)
.authenticate(libp2p::noise::NoiseAuthenticated::xx(&key_pair).unwrap())
.multiplex(libp2p::yamux::YamuxConfig::default())
.authenticate(noise::NoiseAuthenticated::xx(&key_pair).unwrap())
.multiplex(yamux::YamuxConfig::default())
.boxed(),
MyBehaviour {
identify: identify::Behaviour::new(identify::Config::new(
Expand Down

0 comments on commit eef07e9

Please sign in to comment.