We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7925be commit 5e5a8a6Copy full SHA for 5e5a8a6
multiaddr/util.py
@@ -28,8 +28,4 @@ def packed_net_bytes_to_int(b):
28
else: # PY2
29
def packed_net_bytes_to_int(b):
30
"""Convert the given big-endian byte-string to an int."""
31
- return int(b.encode('hex'), 16)
32
-
33
34
-def decode_big_endian_16(b):
35
- return struct.unpack_from('>H', b.rjust(2, b'\0'))[0]
+ return int(b.encode('hex'), 16)
tests/test_multiaddr.py
@@ -71,6 +71,7 @@ def test_invalid(addr_str):
71
"/udp/1234",
72
"/tcp/1234",
73
"/sctp/1234",
74
+ "/utp",
75
"/udp/65535",
76
"/tcp/65535",
77
"/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC",
0 commit comments