chore: ignore arbitrary data stored in `multiaddrs` enr key (#2853)

This commit is contained in:
richΛrd 2024-06-27 10:01:47 -04:00 committed by GitHub
parent 7205f95cff
commit 76d5b2642d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -55,7 +55,8 @@ func decodeMultiaddrs(buffer: seq[byte]): EnrResult[seq[MultiAddress]] =
return err("malformed multiaddr field: invalid length")
let addrRaw = ?readBytes(buffer, addrLen.int, pos)
let address = MultiAddress.init(addrRaw).get()
let address = MultiAddress.init(addrRaw).valueOr:
continue # Not a valid multiaddress
multiaddrs.add(address)