Skip to content

Commit 819ec79

Browse files
committed
fix typo
1 parent 0405b22 commit 819ec79

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/p2p/client.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ impl P2PClient {
255255
let addr = info.observed_addr;
256256

257257
// check protocol string
258-
let protocol_ok = self.check_version_with_prefix(&info.protocol_version, "/dria/");
258+
// TODO: take the prefixes from a shared const
259+
let protocol_ok = self.check_version_with_prefix(&info.protocol_version, "dria/");
259260
if !protocol_ok {
260261
log::warn!(
261262
"Identify: Peer {} has different Identify protocol: (have {}, want {})",

src/p2p/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use libp2p::StreamProtocol;
55
pub(crate) const P2P_KADEMLIA_PROTOCOL: StreamProtocol =
66
StreamProtocol::new(concat!("/dria/kad/", env!("CARGO_PKG_VERSION")));
77

8-
/// Kademlia protocol version, in the form of `dria/<version>`.
8+
/// Protocol string, checked by Identify protocol
99
pub(crate) const P2P_PROTOCOL_STRING: &str = concat!("dria/", env!("CARGO_PKG_VERSION"));
1010

1111
mod behaviour;

0 commit comments

Comments
 (0)