mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-07-04 20:21:33 +00:00
refactor(plaintext): rename symbols to follow naming convention
Related: #2217. Pull-Request: #4535.
This commit is contained in:
@ -25,7 +25,7 @@ use libp2p_core::{
|
||||
multiaddr::Protocol, transport::MemoryTransport, upgrade::Version, Multiaddr, Transport,
|
||||
};
|
||||
use libp2p_identity::{Keypair, PeerId};
|
||||
use libp2p_plaintext::PlainText2Config;
|
||||
use libp2p_plaintext as plaintext;
|
||||
use libp2p_swarm::dial_opts::PeerCondition;
|
||||
use libp2p_swarm::{
|
||||
dial_opts::DialOpts, NetworkBehaviour, Swarm, SwarmBuilder, SwarmEvent, THandlerErr,
|
||||
@ -41,8 +41,8 @@ pub trait SwarmExt {
|
||||
|
||||
/// Create a new [`Swarm`] with an ephemeral identity.
|
||||
///
|
||||
/// The swarm will use a [`MemoryTransport`] together with [`PlainText2Config`] authentication layer and
|
||||
/// yamux as the multiplexer. However, these details should not be relied upon by the test
|
||||
/// The swarm will use a [`MemoryTransport`] together with a [`plaintext::Config`] authentication layer and
|
||||
/// [`yamux::Config`] as the multiplexer. However, these details should not be relied upon by the test
|
||||
/// and may change at any time.
|
||||
fn new_ephemeral(behaviour_fn: impl FnOnce(Keypair) -> Self::NB) -> Self
|
||||
where
|
||||
@ -211,9 +211,7 @@ where
|
||||
let transport = MemoryTransport::default()
|
||||
.or_transport(libp2p_tcp::async_io::Transport::default())
|
||||
.upgrade(Version::V1)
|
||||
.authenticate(PlainText2Config {
|
||||
local_public_key: identity.public(),
|
||||
})
|
||||
.authenticate(plaintext::Config::new(&identity))
|
||||
.multiplex(yamux::Config::default())
|
||||
.timeout(Duration::from_secs(20))
|
||||
.boxed();
|
||||
|
Reference in New Issue
Block a user