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:
Pierre Krieger
2020-05-18 12:42:51 +02:00
committed by GitHub
parent 2fbd1a5503
commit 162a0be0c2
2 changed files with 6 additions and 1 deletions

View File

@ -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`.