From 3a38e0e76aeae4dd86e209f078247b5ec065149d Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Thu, 15 Sep 2022 18:54:37 -0400 Subject: [PATCH] fix: check if enr has UDP (#316) --- waku/v2/dnsdisc/enr.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/waku/v2/dnsdisc/enr.go b/waku/v2/dnsdisc/enr.go index 5d71390c..55cd812a 100644 --- a/waku/v2/dnsdisc/enr.go +++ b/waku/v2/dnsdisc/enr.go @@ -67,7 +67,7 @@ func RetrieveNodes(ctx context.Context, url string, opts ...DnsDiscoveryOption) func hasUDP(node *enode.Node) bool { enrUDP := new(enr.UDP) if err := node.Record().Load(enr.WithEntry(enrUDP.ENRKey(), enrUDP)); err != nil { - return err == nil + return false } - return false + return true }