Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
erhant committed Aug 28, 2024
1 parent 0405b22 commit 819ec79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/p2p/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ impl P2PClient {
let addr = info.observed_addr;

// check protocol string
let protocol_ok = self.check_version_with_prefix(&info.protocol_version, "/dria/");
// TODO: take the prefixes from a shared const
let protocol_ok = self.check_version_with_prefix(&info.protocol_version, "dria/");
if !protocol_ok {
log::warn!(
"Identify: Peer {} has different Identify protocol: (have {}, want {})",
Expand Down
2 changes: 1 addition & 1 deletion src/p2p/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use libp2p::StreamProtocol;
pub(crate) const P2P_KADEMLIA_PROTOCOL: StreamProtocol =
StreamProtocol::new(concat!("/dria/kad/", env!("CARGO_PKG_VERSION")));

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

mod behaviour;
Expand Down

0 comments on commit 819ec79

Please sign in to comment.