fix: empty bytes in enr multiaddress (#442)

This commit is contained in:
RichΛrd 2023-02-09 08:33:07 -04:00 committed by GitHub
parent 7508b08c74
commit 1cebf21942
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ func Multiaddress(node *enode.Node) ([]multiaddr.Multiaddr, error) {
if err := node.Record().Load(enr.WithEntry(MultiaddrENRField, &multiaddrRaw)); err != nil {
if !enr.IsNotFound(err) {
return nil, err
} else {
} else if len(multiaddrRaw) == 0 {
// No multiaddr entry on enr
return result, nil
}