mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-01 04:01:20 +00:00
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
This commit is contained in:
parent
5f196dd231
commit
368705a146
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user