mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-25 15:51:34 +00:00
Display the identity hash of PeerIds when relevant (#1576)
* Display the identity hash of PeerIds when relevant * Add CHANGELOG entry
This commit is contained in:
@ -4,6 +4,11 @@
|
|||||||
attempts per peer, with a configurable limit.
|
attempts per peer, with a configurable limit.
|
||||||
[PR 1506](https://github.com/libp2p/rust-libp2p/pull/1506)
|
[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-core`: Updated to multihash 0.11.0.
|
- `libp2p-core`: Updated to multihash 0.11.0.
|
||||||
[PR 1566](https://github.com/libp2p/rust-libp2p/pull/1566)
|
[PR 1566](https://github.com/libp2p/rust-libp2p/pull/1566)
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ impl PeerId {
|
|||||||
|
|
||||||
/// Returns a base-58 encoded string of this `PeerId`.
|
/// Returns a base-58 encoded string of this `PeerId`.
|
||||||
pub fn to_base58(&self) -> String {
|
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`.
|
/// Checks whether the public key passed as parameter matches the public key of this `PeerId`.
|
||||||
|
Reference in New Issue
Block a user