From 7b18d6e6427a21ff2fbd87cac9449270206d3761 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Tue, 11 Feb 2020 19:52:07 +0200 Subject: [PATCH] Oops, copying and pasting code is evil --- eth/p2p/discoveryv5/enr.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eth/p2p/discoveryv5/enr.nim b/eth/p2p/discoveryv5/enr.nim index 7a9fc83..2b904e1 100644 --- a/eth/p2p/discoveryv5/enr.nim +++ b/eth/p2p/discoveryv5/enr.nim @@ -106,8 +106,8 @@ proc init*(T: type Record, seqNum: uint64, isV6 = address.ip.family == IPv6 ipField = if isV6: ("ip6", address.ip.address_v6.toField) else: ("ip", address.ip.address_v4.toField) - tcpField = ((if isV6: "tcp6" else: "tcp"), address.udpPort.uint16.toField) - udpField = ((if isV6: "udp6" else: "udp"), address.tcpPort.uint16.toField) + tcpField = ((if isV6: "tcp6" else: "tcp"), address.tcpPort.uint16.toField) + udpField = ((if isV6: "udp6" else: "udp"), address.udpPort.uint16.toField) makeEnrAux(seqNum, pk, [ipField, tcpField, udpField])