fix: check if enr has UDP (#316)

This commit is contained in:
Richard Ramos 2022-09-15 18:54:37 -04:00 committed by GitHub
parent b6ff038612
commit 3a38e0e76a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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 true
}