mirror of
https://github.com/logos-messaging/logos-messaging-go.git
synced 2026-01-10 01:43:08 +00:00
fix: hide false positive
This commit is contained in:
parent
434111f66c
commit
fd65221706
@ -161,13 +161,13 @@ func newLocalnode(priv *ecdsa.PrivateKey, ipAddr net.IP, udpPort int, tcpPort in
|
||||
localnode.Set(enr.IP(ipAddr))
|
||||
|
||||
if udpPort > 0 && udpPort <= math.MaxUint16 {
|
||||
localnode.Set(enr.UDP(uint16(udpPort)))
|
||||
localnode.Set(enr.UDP(uint16(udpPort))) // lgtm [go/incorrect-integer-conversion]
|
||||
} else {
|
||||
log.Error("could not set udpPort ", udpPort)
|
||||
}
|
||||
|
||||
if tcpPort > 0 && tcpPort <= math.MaxUint16 {
|
||||
localnode.Set(enr.TCP(uint16(tcpPort)))
|
||||
localnode.Set(enr.TCP(uint16(tcpPort))) // lgtm [go/incorrect-integer-conversion]
|
||||
} else {
|
||||
log.Error("could not set tcpPort ", tcpPort)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user