Skip to content

Commit

Permalink
refactor!: Move ConnectionId and PendingPoint to libp2p-swarm (l…
Browse files Browse the repository at this point in the history
…ibp2p#3346)

Both of these are only needed as part of `libp2p-swarm`. Them residing in `libp2p-core` is a left-over from when `libp2p-core` still contained `Pool`.
  • Loading branch information
thomaseizinger authored Jan 18, 2023
1 parent a731f8e commit baef459
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
8 changes: 3 additions & 5 deletions src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ use as_server::AsServer;
pub use as_server::{InboundProbeError, InboundProbeEvent};
use futures_timer::Delay;
use instant::Instant;
use libp2p_core::{
connection::ConnectionId, multiaddr::Protocol, ConnectedPoint, Endpoint, Multiaddr, PeerId,
};
use libp2p_core::{multiaddr::Protocol, ConnectedPoint, Endpoint, Multiaddr, PeerId};
use libp2p_request_response::{
self as request_response, ProtocolSupport, RequestId, ResponseChannel,
};
Expand All @@ -39,8 +37,8 @@ use libp2p_swarm::{
AddressChange, ConnectionClosed, ConnectionEstablished, DialFailure, ExpiredExternalAddr,
ExpiredListenAddr, FromSwarm,
},
ConnectionHandler, ExternalAddresses, IntoConnectionHandler, ListenAddresses, NetworkBehaviour,
NetworkBehaviourAction, PollParameters,
ConnectionHandler, ConnectionId, ExternalAddresses, IntoConnectionHandler, ListenAddresses,
NetworkBehaviour, NetworkBehaviourAction, PollParameters,
};
use std::{
collections::{HashMap, VecDeque},
Expand Down
5 changes: 3 additions & 2 deletions src/behaviour/as_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ use super::{
use futures::FutureExt;
use futures_timer::Delay;
use instant::Instant;
use libp2p_core::{connection::ConnectionId, Multiaddr, PeerId};
use libp2p_core::{Multiaddr, PeerId};
use libp2p_request_response::{self as request_response, OutboundFailure, RequestId};
use libp2p_swarm::{
AddressScore, ExternalAddresses, ListenAddresses, NetworkBehaviourAction, PollParameters,
AddressScore, ConnectionId, ExternalAddresses, ListenAddresses, NetworkBehaviourAction,
PollParameters,
};
use rand::{seq::SliceRandom, thread_rng};
use std::{
Expand Down
4 changes: 2 additions & 2 deletions src/behaviour/as_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ use super::{
ResponseError,
};
use instant::Instant;
use libp2p_core::{connection::ConnectionId, multiaddr::Protocol, Multiaddr, PeerId};
use libp2p_core::{multiaddr::Protocol, Multiaddr, PeerId};
use libp2p_request_response::{
self as request_response, InboundFailure, RequestId, ResponseChannel,
};
use libp2p_swarm::{
dial_opts::{DialOpts, PeerCondition},
DialError, NetworkBehaviour, NetworkBehaviourAction, PollParameters,
ConnectionId, DialError, NetworkBehaviour, NetworkBehaviourAction, PollParameters,
};
use std::{
collections::{HashMap, HashSet, VecDeque},
Expand Down

0 comments on commit baef459

Please sign in to comment.