Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swarm: Split off "keep alive" functionality from DummyConnectionHandler #2859

Merged
merged 42 commits into from
Oct 5, 2022
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
05fa3c7
Add implementation of `ConnectionHandler` for ()
thomaseizinger Aug 30, 2022
907f025
Replace usages of `DummyConnectionHandler` with `()`
thomaseizinger Aug 30, 2022
ec843b0
Split `DummyBehaviour` into `KeepAliveBehaviour` and unit-impl
thomaseizinger Aug 31, 2022
237b867
Fix doc test by implementing `Default`
thomaseizinger Sep 2, 2022
48c0e36
Merge branch 'master' into unit-connection-handler
thomaseizinger Sep 2, 2022
ba06870
Re-introduce `Dummy{ConnectionHandler,NetworkBehaviour}`
thomaseizinger Sep 12, 2022
ce7efb8
Restore `DummyNetworkBehaviour` where it was used before
thomaseizinger Sep 12, 2022
6c93d6d
Remove license text
thomaseizinger Sep 12, 2022
6db3dee
Apply same member order as declaration
thomaseizinger Sep 12, 2022
5aa920d
Use `void::unreachable` instead of panicking
thomaseizinger Sep 12, 2022
805d1c3
Merge branch 'master' into unit-connection-handler
thomaseizinger Sep 12, 2022
3797dcf
Add changelog entry and bump version
thomaseizinger Sep 12, 2022
b236e7f
Use correct type in tests
thomaseizinger Sep 12, 2022
729d57e
Bump versions
thomaseizinger Sep 12, 2022
ea3fa2a
Rename network behaviours to remove `Behaviour` postfix
thomaseizinger Sep 16, 2022
ca4adbe
Merge branch 'master' into unit-connection-handler
thomaseizinger Sep 16, 2022
78d2a4d
Merge branch 'master' into unit-connection-handler
thomaseizinger Sep 19, 2022
9703c61
Merge branch 'master' into unit-connection-handler
thomaseizinger Sep 22, 2022
569afc2
Fix invalid rustdoc link
thomaseizinger Sep 22, 2022
c736e8d
Deprecate `Config::with_keep_alive` in `libp2p-ping`
thomaseizinger Sep 22, 2022
93af508
Use default where possible
thomaseizinger Sep 22, 2022
67ba7d7
Merge branch 'master' into unit-connection-handler
thomaseizinger Sep 23, 2022
70c1f21
Use proper doc links in examples
thomaseizinger Sep 23, 2022
9ce104f
Merge branch 'master' into unit-connection-handler
thomaseizinger Sep 23, 2022
75e36f9
Merge branch 'master' into unit-connection-handler
thomaseizinger Sep 27, 2022
8a2f14a
Merge branch 'master' into unit-connection-handler
thomaseizinger Sep 27, 2022
cd7bd6d
Have dummy and keep-alive Behaviour adhere to naming convention
thomaseizinger Sep 27, 2022
d847b47
Merge Behaviour and ConnectionHandler into dummy and keep_alive modules
thomaseizinger Sep 27, 2022
3b8f1b0
Update changelog
thomaseizinger Sep 27, 2022
feb4703
Merge branch 'master' into unit-connection-handler
mxinden Sep 29, 2022
ad2f597
Merge branch 'master' into unit-connection-handler
thomaseizinger Sep 29, 2022
780460f
Merge branch 'unit-connection-handler' of github.com:libp2p/rust-libp…
thomaseizinger Sep 29, 2022
a750b07
Fix docs
thomaseizinger Sep 30, 2022
0a167a1
Merge branch 'master' into unit-connection-handler
thomaseizinger Oct 4, 2022
b84857f
Fix changelog
thomaseizinger Oct 4, 2022
add20ce
Fix ping changelog
thomaseizinger Oct 4, 2022
e6f3c5a
Fix imports
thomaseizinger Oct 4, 2022
212b787
Fix empty module
thomaseizinger Oct 4, 2022
8a83545
Merge branch 'master' into unit-connection-handler
thomaseizinger Oct 4, 2022
d50c0d2
Merge branch 'master' into unit-connection-handler
thomaseizinger Oct 4, 2022
54ff6f7
Fix typo
thomaseizinger Oct 4, 2022
1f98636
Merge branch 'master' into unit-connection-handler
thomaseizinger Oct 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,22 @@ getrandom = "0.2.3" # Explicit dependency to be used in `wasm-bindgen` feature
instant = "0.1.11" # Explicit dependency to be used in `wasm-bindgen` feature
lazy_static = "1.2"

libp2p-autonat = { version = "0.7.0", path = "protocols/autonat", optional = true }
libp2p-autonat = { version = "0.8.0", path = "protocols/autonat", optional = true }
libp2p-core = { version = "0.36.0", path = "core", default-features = false }
libp2p-dcutr = { version = "0.6.0", path = "protocols/dcutr", optional = true }
libp2p-floodsub = { version = "0.39.0", path = "protocols/floodsub", optional = true }
libp2p-identify = { version = "0.39.0", path = "protocols/identify", optional = true }
libp2p-kad = { version = "0.40.0", path = "protocols/kad", optional = true }
libp2p-metrics = { version = "0.9.0", path = "misc/metrics", optional = true }
libp2p-dcutr = { version = "0.7.0", path = "protocols/dcutr", optional = true }
libp2p-floodsub = { version = "0.40.0", path = "protocols/floodsub", optional = true }
libp2p-identify = { version = "0.40.0", path = "protocols/identify", optional = true }
libp2p-kad = { version = "0.41.0", path = "protocols/kad", optional = true }
libp2p-metrics = { version = "0.10.0", path = "misc/metrics", optional = true }
libp2p-mplex = { version = "0.36.0", path = "muxers/mplex", optional = true }
libp2p-noise = { version = "0.39.0", path = "transports/noise", optional = true }
libp2p-ping = { version = "0.39.0", path = "protocols/ping", optional = true }
libp2p-ping = { version = "0.40.0", path = "protocols/ping", optional = true }
libp2p-plaintext = { version = "0.36.0", path = "transports/plaintext", optional = true }
libp2p-pnet = { version = "0.22.0", path = "transports/pnet", optional = true }
libp2p-relay = { version = "0.12.0", path = "protocols/relay", optional = true }
libp2p-rendezvous = { version = "0.9.0", path = "protocols/rendezvous", optional = true }
libp2p-request-response = { version = "0.21.0", path = "protocols/request-response", optional = true }
libp2p-swarm = { version = "0.39.0", path = "swarm" }
libp2p-relay = { version = "0.13.0", path = "protocols/relay", optional = true }
libp2p-rendezvous = { version = "0.10.0", path = "protocols/rendezvous", optional = true }
libp2p-request-response = { version = "0.22.0", path = "protocols/request-response", optional = true }
libp2p-swarm = { version = "0.40.0", path = "swarm" }
libp2p-swarm-derive = { version = "0.30.0", path = "swarm-derive" }
libp2p-uds = { version = "0.35.0", path = "transports/uds", optional = true }
libp2p-wasm-ext = { version = "0.36.0", path = "transports/wasm-ext", default-features = false, optional = true }
Expand All @@ -109,12 +109,12 @@ smallvec = "1.6.1"
[target.'cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))'.dependencies]
libp2p-deflate = { version = "0.36.0", path = "transports/deflate", optional = true }
libp2p-dns = { version = "0.36.0", path = "transports/dns", optional = true, default-features = false }
libp2p-mdns = { version = "0.40.0", path = "protocols/mdns", optional = true, default-features = false }
libp2p-mdns = { version = "0.41.0", path = "protocols/mdns", optional = true, default-features = false }
libp2p-tcp = { version = "0.37.0", path = "transports/tcp", default-features = false, optional = true }
libp2p-websocket = { version = "0.38.0", path = "transports/websocket", optional = true }

[target.'cfg(not(target_os = "unknown"))'.dependencies]
libp2p-gossipsub = { version = "0.41.0", path = "protocols/gossipsub", optional = true }
libp2p-gossipsub = { version = "0.42.0", path = "protocols/gossipsub", optional = true }

[dev-dependencies]
async-std = { version = "1.6.2", features = ["attributes"] }
Expand Down
16 changes: 16 additions & 0 deletions misc/metrics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# 0.10.0 [unreleased]

- Update to `libp2p-swarm` `v0.40.0`.

- Update to `libp2p-dcutr` `v0.7.0`.

- Update to `libp2p-ping` `v0.40.0`.

- Update to `libp2p-identify` `v0.40.0`.

- Update to `libp2p-relay` `v0.13.0`.

- Update to `libp2p-relay` `v0.12.0`.

- Update to `libp2p-kad` `v0.41.0`.

# 0.9.0

- Update to `libp2p-swarm` `v0.39.0`.
Expand Down
16 changes: 8 additions & 8 deletions misc/metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "libp2p-metrics"
edition = "2021"
rust-version = "1.56.1"
description = "Metrics for libp2p"
version = "0.9.0"
version = "0.10.0"
authors = ["Max Inden <mail@max-inden.de>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand All @@ -20,16 +20,16 @@ dcutr = ["libp2p-dcutr"]

[dependencies]
libp2p-core = { version = "0.36.0", path = "../../core", default-features = false }
libp2p-dcutr = { version = "0.6.0", path = "../../protocols/dcutr", optional = true }
libp2p-identify = { version = "0.39.0", path = "../../protocols/identify", optional = true }
libp2p-kad = { version = "0.40.0", path = "../../protocols/kad", optional = true }
libp2p-ping = { version = "0.39.0", path = "../../protocols/ping", optional = true }
libp2p-relay = { version = "0.12.0", path = "../../protocols/relay", optional = true }
libp2p-swarm = { version = "0.39.0", path = "../../swarm" }
libp2p-dcutr = { version = "0.7.0", path = "../../protocols/dcutr", optional = true }
libp2p-identify = { version = "0.40.0", path = "../../protocols/identify", optional = true }
libp2p-kad = { version = "0.41.0", path = "../../protocols/kad", optional = true }
libp2p-ping = { version = "0.40.0", path = "../../protocols/ping", optional = true }
libp2p-relay = { version = "0.13.0", path = "../../protocols/relay", optional = true }
libp2p-swarm = { version = "0.40.0", path = "../../swarm" }
prometheus-client = "0.18.0"

[target.'cfg(not(target_os = "unknown"))'.dependencies]
libp2p-gossipsub = { version = "0.41.0", path = "../../protocols/gossipsub", optional = true }
libp2p-gossipsub = { version = "0.42.0", path = "../../protocols/gossipsub", optional = true }

[dev-dependencies]
log = "0.4.0"
Expand Down
6 changes: 3 additions & 3 deletions misc/multistream-select/tests/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use libp2p_core::{
};
use libp2p_mplex::MplexConfig;
use libp2p_plaintext::PlainText2Config;
use libp2p_swarm::{DummyBehaviour, Swarm, SwarmEvent};
use libp2p_swarm::{DummyNetworkBehaviour, Swarm, SwarmEvent};
use rand::random;
use std::task::Poll;

Expand Down Expand Up @@ -61,8 +61,8 @@ fn transport_upgrade() {

let listen_addr = Multiaddr::from(Protocol::Memory(random::<u64>()));

let mut dialer = Swarm::new(dialer_transport, DummyBehaviour::default(), dialer_id);
let mut listener = Swarm::new(listener_transport, DummyBehaviour::default(), listener_id);
let mut dialer = Swarm::new(dialer_transport, DummyNetworkBehaviour, dialer_id);
let mut listener = Swarm::new(listener_transport, DummyNetworkBehaviour, listener_id);

listener.listen_on(listen_addr).unwrap();
let (addr_sender, addr_receiver) = oneshot::channel();
Expand Down
4 changes: 4 additions & 0 deletions protocols/autonat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.8.0 [unreleased]

- Update to `libp2p-swarm` `v0.40.0`.

# 0.7.0

- Update to `libp2p-swarm` `v0.39.0`.
Expand Down
6 changes: 3 additions & 3 deletions protocols/autonat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "libp2p-autonat"
edition = "2021"
rust-version = "1.56.1"
description = "NAT and firewall detection for libp2p"
version = "0.7.0"
version = "0.8.0"
authors = ["David Craven <david@craven.ch>", "Elena Frank <elena.frank@protonmail.com>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand All @@ -19,8 +19,8 @@ futures = "0.3"
futures-timer = "3.0"
instant = "0.1"
libp2p-core = { version = "0.36.0", path = "../../core", default-features = false }
libp2p-swarm = { version = "0.39.0", path = "../../swarm" }
libp2p-request-response = { version = "0.21.0", path = "../request-response" }
libp2p-swarm = { version = "0.40.0", path = "../../swarm" }
libp2p-request-response = { version = "0.22.0", path = "../request-response" }
log = "0.4"
rand = "0.8"
prost = "0.11"
Expand Down
4 changes: 4 additions & 0 deletions protocols/dcutr/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.7.0 [unreleased]

- Update to `libp2p-swarm` `v0.40.0`.

# 0.6.0

- Update to `libp2p-swarm` `v0.39.0`.
Expand Down
4 changes: 2 additions & 2 deletions protocols/dcutr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "libp2p-dcutr"
edition = "2021"
rust-version = "1.56.1"
description = "Direct connection upgrade through relay"
version = "0.6.0"
version = "0.7.0"
authors = ["Max Inden <mail@max-inden.de>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand All @@ -18,7 +18,7 @@ futures = "0.3.1"
futures-timer = "3.0"
instant = "0.1.11"
libp2p-core = { version = "0.36.0", path = "../../core", default-features = false }
libp2p-swarm = { version = "0.39.0", path = "../../swarm" }
libp2p-swarm = { version = "0.40.0", path = "../../swarm" }
log = "0.4"
prost-codec = { version = "0.2", path = "../../misc/prost-codec" }
prost = "0.11"
Expand Down
5 changes: 2 additions & 3 deletions protocols/dcutr/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ use either::Either;
use libp2p_core::connection::ConnectionId;
use libp2p_core::upgrade::{self, DeniedUpgrade};
use libp2p_core::{ConnectedPoint, PeerId};
use libp2p_swarm::handler::DummyConnectionHandler;
use libp2p_swarm::handler::SendWrapper;
use libp2p_swarm::handler::{DummyConnectionHandler, SendWrapper};
use libp2p_swarm::{ConnectionHandler, IntoConnectionHandler};

pub mod direct;
Expand Down Expand Up @@ -52,7 +51,7 @@ impl IntoConnectionHandler for Prototype {
if endpoint.is_relayed() {
Either::Left(relayed::Handler::new(endpoint.clone()))
} else {
Either::Right(Either::Right(DummyConnectionHandler::default()))
Either::Right(Either::Right(DummyConnectionHandler))
}
}
Self::DirectConnection {
Expand Down
4 changes: 4 additions & 0 deletions protocols/floodsub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.40.0 [unreleased]

- Update to `libp2p-swarm` `v0.40.0`.

# 0.39.0

- Update to `libp2p-swarm` `v0.39.0`.
Expand Down
4 changes: 2 additions & 2 deletions protocols/floodsub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "libp2p-floodsub"
edition = "2021"
rust-version = "1.56.1"
description = "Floodsub protocol for libp2p"
version = "0.39.0"
version = "0.40.0"
authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand All @@ -15,7 +15,7 @@ cuckoofilter = "0.5.0"
fnv = "1.0"
futures = "0.3.1"
libp2p-core = { version = "0.36.0", path = "../../core", default-features = false }
libp2p-swarm = { version = "0.39.0", path = "../../swarm" }
libp2p-swarm = { version = "0.40.0", path = "../../swarm" }
log = "0.4"
prost = "0.11"
rand = "0.7"
Expand Down
4 changes: 4 additions & 0 deletions protocols/gossipsub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.42.0 [unreleased]

- Update to `libp2p-swarm` `v0.40.0`.

# 0.41.0

- Update to `libp2p-swarm` `v0.39.0`.
Expand Down
4 changes: 2 additions & 2 deletions protocols/gossipsub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name = "libp2p-gossipsub"
edition = "2021"
rust-version = "1.56.1"
description = "Gossipsub protocol for libp2p"
version = "0.41.0"
version = "0.42.0"
authors = ["Age Manning <Age@AgeManning.com>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
keywords = ["peer-to-peer", "libp2p", "networking"]
categories = ["network-programming", "asynchronous"]

[dependencies]
libp2p-swarm = { version = "0.39.0", path = "../../swarm" }
libp2p-swarm = { version = "0.40.0", path = "../../swarm" }
libp2p-core = { version = "0.36.0", path = "../../core", default-features = false }
bytes = "1.0"
byteorder = "1.3.4"
Expand Down
4 changes: 4 additions & 0 deletions protocols/identify/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.40.0 [unreleased]

- Update to `libp2p-swarm` `v0.40.0`.

# 0.39.0

- Update to `libp2p-swarm` `v0.39.0`.
Expand Down
4 changes: 2 additions & 2 deletions protocols/identify/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "libp2p-identify"
edition = "2021"
rust-version = "1.56.1"
description = "Nodes identifcation protocol for libp2p"
version = "0.39.0"
version = "0.40.0"
authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand All @@ -15,7 +15,7 @@ asynchronous-codec = "0.6"
futures = "0.3.1"
futures-timer = "3.0.2"
libp2p-core = { version = "0.36.0", path = "../../core", default-features = false }
libp2p-swarm = { version = "0.39.0", path = "../../swarm" }
libp2p-swarm = { version = "0.40.0", path = "../../swarm" }
log = "0.4.1"
lru = "0.7.2"
prost-codec = { version = "0.2", path = "../../misc/prost-codec" }
Expand Down
4 changes: 4 additions & 0 deletions protocols/kad/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.41.0 [unreleased]

- Update to `libp2p-swarm` `v0.40.0`.

# 0.40.0

- Add support for multiple protocol names. Update `Kademlia`, `KademliaConfig`,
Expand Down
4 changes: 2 additions & 2 deletions protocols/kad/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "libp2p-kad"
edition = "2021"
rust-version = "1.56.1"
description = "Kademlia protocol for libp2p"
version = "0.40.0"
version = "0.41.0"
authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand All @@ -19,7 +19,7 @@ asynchronous-codec = "0.6"
futures = "0.3.1"
log = "0.4"
libp2p-core = { version = "0.36.0", path = "../../core", default-features = false }
libp2p-swarm = { version = "0.39.0", path = "../../swarm" }
libp2p-swarm = { version = "0.40.0", path = "../../swarm" }
prost = "0.11"
rand = "0.7.2"
sha2 = "0.10.0"
Expand Down
4 changes: 4 additions & 0 deletions protocols/mdns/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.41.0 [unreleased]

- Update to `libp2p-swarm` `v0.40.0`.

# 0.40.0

- Update to `libp2p-swarm` `v0.39.0`.
Expand Down
4 changes: 2 additions & 2 deletions protocols/mdns/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "libp2p-mdns"
edition = "2021"
rust-version = "1.56.1"
version = "0.40.0"
version = "0.41.0"
description = "Implementation of the libp2p mDNS discovery method"
authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
Expand All @@ -17,7 +17,7 @@ futures = "0.3.13"
if-watch = "1.1.1"
lazy_static = "1.4.0"
libp2p-core = { version = "0.36.0", path = "../../core", default-features = false }
libp2p-swarm = { version = "0.39.0", path = "../../swarm" }
libp2p-swarm = { version = "0.40.0", path = "../../swarm" }
log = "0.4.14"
rand = "0.8.3"
smallvec = "1.6.1"
Expand Down
8 changes: 3 additions & 5 deletions protocols/mdns/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ use futures::Stream;
use if_watch::{IfEvent, IfWatcher};
use libp2p_core::transport::ListenerId;
use libp2p_core::{Multiaddr, PeerId};
use libp2p_swarm::{
handler::DummyConnectionHandler, ConnectionHandler, NetworkBehaviour, NetworkBehaviourAction,
PollParameters,
};
use libp2p_swarm::handler::DummyConnectionHandler;
use libp2p_swarm::{ConnectionHandler, NetworkBehaviour, NetworkBehaviourAction, PollParameters};
use smallvec::SmallVec;
use std::collections::hash_map::{Entry, HashMap};
use std::{cmp, fmt, io, net::IpAddr, pin::Pin, task::Context, task::Poll, time::Instant};
Expand Down Expand Up @@ -124,7 +122,7 @@ where
type OutEvent = MdnsEvent;

fn new_handler(&mut self) -> Self::ConnectionHandler {
DummyConnectionHandler::default()
DummyConnectionHandler
}

fn addresses_of_peer(&mut self, peer_id: &PeerId) -> Vec<Multiaddr> {
Expand Down
4 changes: 4 additions & 0 deletions protocols/ping/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.40.0 [unreleased]

- Update to `libp2p-swarm` `v0.40.0`.

# 0.39.0

- Update to `libp2p-swarm` `v0.39.0`.
Expand Down
4 changes: 2 additions & 2 deletions protocols/ping/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "libp2p-ping"
edition = "2021"
rust-version = "1.56.1"
description = "Ping protocol for libp2p"
version = "0.39.0"
version = "0.40.0"
authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand All @@ -15,7 +15,7 @@ futures = "0.3.1"
futures-timer = "3.0.2"
instant = "0.1.11"
libp2p-core = { version = "0.36.0", path = "../../core", default-features = false }
libp2p-swarm = { version = "0.39.0", path = "../../swarm" }
libp2p-swarm = { version = "0.40.0", path = "../../swarm" }
log = "0.4.1"
rand = "0.7.2"
void = "1.0"
Expand Down
8 changes: 2 additions & 6 deletions protocols/ping/tests/ping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use libp2p_core::{
use libp2p_mplex as mplex;
use libp2p_noise as noise;
use libp2p_ping as ping;
use libp2p_swarm::{DummyBehaviour, KeepAlive, Swarm, SwarmEvent};
use libp2p_swarm::{KeepAliveBehaviour, Swarm, SwarmEvent};
use libp2p_tcp::{GenTcpConfig, TcpTransport};
use libp2p_yamux as yamux;
use quickcheck::*;
Expand Down Expand Up @@ -188,11 +188,7 @@ fn max_failures() {
#[test]
fn unsupported_doesnt_fail() {
let (peer1_id, trans) = mk_transport(MuxerChoice::Mplex);
let mut swarm1 = Swarm::new(
trans,
DummyBehaviour::with_keep_alive(KeepAlive::Yes),
peer1_id.clone(),
);
let mut swarm1 = Swarm::new(trans, KeepAliveBehaviour, peer1_id.clone());

let (peer2_id, trans) = mk_transport(MuxerChoice::Mplex);
let mut swarm2 = Swarm::new(
Expand Down
Loading