Add debug msg

This commit is contained in:
mhchia 2019-07-20 22:47:37 +08:00
parent 085a5e7526
commit 8d3b3fdb6c
No known key found for this signature in database
GPG Key ID: 389EFBEA1362589A

View File

@ -20,7 +20,7 @@ def info_from_p2p_addr(addr: multiaddr.Multiaddr) -> PeerInfo:
parts = addr.split()
if not parts:
raise InvalidAddrError()
raise InvalidAddrError(f"`parts`={parts} should at least have a protocol `P_P2P`")
p2p_part = parts[-1]
last_protocol_code = p2p_part.protocols()[0].code