From 368705a1465c4322948d14ee46d42475c472ca1e Mon Sep 17 00:00:00 2001 From: yojoe <58518123+yojoe@users.noreply.github.com> Date: Tue, 15 Nov 2022 02:22:11 +0100 Subject: [PATCH] docs(core): Document byte format of `PeerId` (#3084) PeerId data is more than just a multihash of the public key. See discussion: https://github.com/libp2p/rust-libp2p/discussions/3079 --- core/src/peer_id.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/peer_id.rs b/core/src/peer_id.rs index a70d8f68..014f1fc2 100644 --- a/core/src/peer_id.rs +++ b/core/src/peer_id.rs @@ -34,8 +34,8 @@ const MAX_INLINE_KEY_LENGTH: usize = 42; /// Identifier of a peer of the network. /// -/// The data is a multihash of the public key of the peer. -/// See the [spec](https://github.com/libp2p/specs/blob/master/peer-ids/peer-ids.md) for more information. +/// The data is a CIDv0 compatible multihash of the protobuf encoded public key of the peer +/// as specified in [specs/peer-ids](https://github.com/libp2p/specs/blob/master/peer-ids/peer-ids.md). #[derive(Clone, Copy, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct PeerId { multihash: Multihash,