mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-27 00:31:35 +00:00
feat: introduce libp2p-identity
crate
This patch combines the `libp2p_core::identity` and `libp2p_core::peer_id` modules into a new crate: `libp2p-identity`. Resolves https://github.com/libp2p/rust-libp2p/issues/3349. Pull-Request: #3350.
This commit is contained in:
@ -27,7 +27,8 @@ use crate::behaviour::{socket::AsyncSocket, timer::Builder};
|
||||
use crate::Config;
|
||||
use futures::Stream;
|
||||
use if_watch::IfEvent;
|
||||
use libp2p_core::{Endpoint, Multiaddr, PeerId};
|
||||
use libp2p_core::{Endpoint, Multiaddr};
|
||||
use libp2p_identity::PeerId;
|
||||
use libp2p_swarm::behaviour::FromSwarm;
|
||||
use libp2p_swarm::{
|
||||
dummy, ConnectionDenied, ConnectionId, ListenAddresses, NetworkBehaviour,
|
||||
|
@ -25,7 +25,8 @@ use self::dns::{build_query, build_query_response, build_service_discovery_respo
|
||||
use self::query::MdnsPacket;
|
||||
use crate::behaviour::{socket::AsyncSocket, timer::Builder};
|
||||
use crate::Config;
|
||||
use libp2p_core::{Multiaddr, PeerId};
|
||||
use libp2p_core::Multiaddr;
|
||||
use libp2p_identity::PeerId;
|
||||
use libp2p_swarm::ListenAddresses;
|
||||
use socket2::{Domain, Socket, Type};
|
||||
use std::{
|
||||
|
@ -21,7 +21,8 @@
|
||||
//! (M)DNS encoding and decoding on top of the `dns_parser` library.
|
||||
|
||||
use crate::{META_QUERY_SERVICE, SERVICE_NAME};
|
||||
use libp2p_core::{Multiaddr, PeerId};
|
||||
use libp2p_core::Multiaddr;
|
||||
use libp2p_identity::PeerId;
|
||||
use rand::distributions::Alphanumeric;
|
||||
use rand::{thread_rng, Rng};
|
||||
use std::{borrow::Cow, cmp, error, fmt, str, time::Duration};
|
||||
@ -395,7 +396,7 @@ impl error::Error for MdnsResponseError {}
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use libp2p_core::identity;
|
||||
use libp2p_identity as identity;
|
||||
use std::time::Duration;
|
||||
use trust_dns_proto::op::Message;
|
||||
|
||||
|
@ -23,8 +23,8 @@ use crate::{META_QUERY_SERVICE_FQDN, SERVICE_NAME_FQDN};
|
||||
use libp2p_core::{
|
||||
address_translation,
|
||||
multiaddr::{Multiaddr, Protocol},
|
||||
PeerId,
|
||||
};
|
||||
use libp2p_identity::PeerId;
|
||||
use std::time::Instant;
|
||||
use std::{convert::TryFrom, fmt, net::SocketAddr, str, time::Duration};
|
||||
use trust_dns_proto::{
|
||||
|
Reference in New Issue
Block a user