Skip to content

Commit 97a55c7

Browse files
committed
ETCM-168: Read ports from bytes as unsigned ints.
1 parent 2175139 commit 97a55c7

File tree

1 file changed

+1
-1
lines changed
  • scalanet/discovery/src/io/iohk/scalanet/discovery/ethereum

1 file changed

+1
-1
lines changed

scalanet/discovery/src/io/iohk/scalanet/discovery/ethereum/Node.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ object Node {
4242
tryParse[InetAddress](key)(bytes => InetAddress.getByAddress(bytes.toArray))
4343

4444
def tryParsePort(key: ByteVector): Option[Int] =
45-
tryParse[Int](key)(bytes => bytes.toInt())
45+
tryParse[Int](key)(bytes => bytes.toInt(signed = false))
4646

4747
for {
4848
ip <- tryParseIP(Keys.ip6) orElse tryParseIP(Keys.ip)

0 commit comments

Comments
 (0)