From 50ae439d20b343477c9cc6097681138dd1170537 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Sat, 7 Sep 2019 11:04:20 -0400 Subject: [PATCH] remove friendly IDs --- libp2p/peer/id.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/libp2p/peer/id.py b/libp2p/peer/id.py index 4d19ee9..ab20ed0 100644 --- a/libp2p/peer/id.py +++ b/libp2p/peer/id.py @@ -6,11 +6,6 @@ import multihash from libp2p.crypto.keys import PublicKey -# NOTE: ``FRIENDLY_IDS`` renders a ``str`` representation of ``ID`` as a -# short string of a prefix of the base58 representation. This feature is primarily -# intended for debugging, logging, etc. -FRIENDLY_IDS = True - # NOTE: On inlining... # See: https://github.com/libp2p/specs/issues/138 # NOTE: enabling to be interoperable w/ the Go implementation @@ -61,15 +56,9 @@ class ID: return self._b58_str def __repr__(self) -> str: - return "" + return f"" - pretty = to_string = to_base58 - - def __str__(self) -> str: - if FRIENDLY_IDS: - return f"" - else: - return self.to_string() + __str__ = pretty = to_string = to_base58 def __eq__(self, other: object) -> bool: if isinstance(other, str):