Merge branch 'main' into replace/peerID/attribute

This commit is contained in:
Luca Vivona
2025-07-16 17:15:10 -04:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@ -44,7 +44,9 @@ async def decode_uvarint_from_stream(reader: Reader) -> int:
res = 0
for shift in itertools.count(0, 7):
if shift > SHIFT_64_BIT_MAX:
raise ParseError("TODO: better exception msg: Integer is too large...")
raise ParseError(
"Varint decoding error: integer exceeds maximum size of 64 bits."
)
byte = await read_exactly(reader, 1)
value = byte[0]

View File

@ -0,0 +1 @@
Improve error message under the function decode_uvarint_from_stream in libp2p/utils/varint.py file