Skip to content

Commit

Permalink
uTP: add invalid packet header version to error result (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeme authored Feb 17, 2025
1 parent e973d0b commit 00977da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth/utp/packets.nim
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func decodePacket*(bytes: openArray[byte]): Result[Packet, string] =

let version = bytes[0] and 0xf
if version != protocolVersion:
return err("Invalid packet version")
return err("Invalid packet version: " & $version)

var kind: PacketType
if not checkedEnumAssign(kind, (bytes[0] shr 4)):
Expand Down

0 comments on commit 00977da

Please sign in to comment.