updating peerinfo variable style
This commit is contained in:
parent
4c0cd8730f
commit
2f33f55141
|
@ -19,12 +19,12 @@ def info_from_p2p_addr(addr):
|
|||
if not parts:
|
||||
raise InvalidAddrError()
|
||||
|
||||
p2ppart = parts[-1]
|
||||
if p2ppart.protocols()[0].code != multiaddr.protocols.P_P2P:
|
||||
p2p_part = parts[-1]
|
||||
if p2p_part.protocols()[0].code != multiaddr.protocols.P_P2P:
|
||||
raise InvalidAddrError()
|
||||
|
||||
# make sure the /p2p value parses as a peer.ID
|
||||
peer_id_str = p2ppart.value_for_protocol(multiaddr.protocols.P_P2P)
|
||||
peer_id_str = p2p_part.value_for_protocol(multiaddr.protocols.P_P2P)
|
||||
peer_id = id_b58_decode(peer_id_str)
|
||||
|
||||
# we might have received just an / p2p part, which means there's no addr.
|
||||
|
|
Loading…
Reference in New Issue
Block a user