Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display the identity hash of PeerIds when relevant #1576

Merged
merged 4 commits into from
May 18, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
attempts per peer, with a configurable limit.
[PR 1506](https://github.com/libp2p/rust-libp2p/pull/1506)

- `libp2p-core`: `PeerId`s that use the identity hashing will now be properly
displayed using the string representation of an identity multihash, rather
than the canonical SHA 256 representation.
[PR 1576](https://github.com/libp2p/rust-libp2p/pull/1576)

- `libp2p-noise`: Added the `X25519Spec` protocol suite which uses
libp2p-noise-spec compliant signatures on static keys as well as the
`/noise` protocol upgrade, hence providing a libp2p-noise-spec compliant
Expand Down
2 changes: 1 addition & 1 deletion core/src/peer_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ impl PeerId {

/// Returns a base-58 encoded string of this `PeerId`.
pub fn to_base58(&self) -> String {
bs58::encode(self.borrow() as &[u8]).into_string()
bs58::encode(self.as_bytes()).into_string()
}

/// Checks whether the public key passed as parameter matches the public key of this `PeerId`.
Expand Down