mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
fix: Peer ID verification during dial (#7)
This commit is contained in:
committed by
lla-dane
parent
58433f9b52
commit
2c03ac46ea
@ -72,9 +72,9 @@ def is_quic_multiaddr(maddr: multiaddr.Multiaddr) -> bool:
|
||||
has_ip = f"/{IP4_PROTOCOL}/" in addr_str or f"/{IP6_PROTOCOL}/" in addr_str
|
||||
has_udp = f"/{UDP_PROTOCOL}/" in addr_str
|
||||
has_quic = (
|
||||
addr_str.endswith(f"/{QUIC_V1_PROTOCOL}")
|
||||
or addr_str.endswith(f"/{QUIC_DRAFT29_PROTOCOL}")
|
||||
or addr_str.endswith("/quic")
|
||||
f"/{QUIC_V1_PROTOCOL}" in addr_str
|
||||
or f"/{QUIC_DRAFT29_PROTOCOL}" in addr_str
|
||||
or "/quic" in addr_str
|
||||
)
|
||||
|
||||
return has_ip and has_udp and has_quic
|
||||
|
||||
Reference in New Issue
Block a user