fix: invalid length of multiaddr field (but loaded succesfully anyway) (#3185)

* fix: invalid length of multiaddr field (but loaded succesfully anyway)
* chore: update VERSION
This commit is contained in:
RichΛrd 2023-02-13 10:41:19 -04:00 committed by GitHub
parent 8acc46f758
commit f6b4721c4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 6 deletions

View File

@ -1 +1 @@
0.131.0
0.131.1

2
go.mod
View File

@ -78,7 +78,7 @@ require (
github.com/ipfs/go-log/v2 v2.5.1
github.com/meirf/gopart v0.0.0-20180520194036-37e9492a85a8
github.com/rmg/iso4217 v1.0.0
github.com/waku-org/go-waku v0.4.1-0.20230209220220-57d707ff5068
github.com/waku-org/go-waku v0.4.1-0.20230213133834-a3f08943acb4
github.com/yeqown/go-qrcode/v2 v2.2.1
github.com/yeqown/go-qrcode/writer/standard v1.2.1
)

4
go.sum
View File

@ -2067,8 +2067,8 @@ github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1
github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
github.com/waku-org/go-discover v0.0.0-20221209174356-61c833f34d98 h1:xwY0kW5XZFimdqfZb9cZwT1S3VJP9j3AE6bdNd9boXM=
github.com/waku-org/go-discover v0.0.0-20221209174356-61c833f34d98/go.mod h1:eBHgM6T4EG0RZzxpxKy+rGz/6Dw2Nd8DWxS0lm9ESDw=
github.com/waku-org/go-waku v0.4.1-0.20230209220220-57d707ff5068 h1:cumSX+srk/qRBd8q6X4JuON9lGh4L25iNDzf+EzefMw=
github.com/waku-org/go-waku v0.4.1-0.20230209220220-57d707ff5068/go.mod h1:sI14mN/sM8inIb2x2b462wydSEFyOyuDKI1cjiVIIpM=
github.com/waku-org/go-waku v0.4.1-0.20230213133834-a3f08943acb4 h1:juvZsi9AXnZrUjRw1nt8K6aK++kY0I60HJxFBaYe7kI=
github.com/waku-org/go-waku v0.4.1-0.20230213133834-a3f08943acb4/go.mod h1:sI14mN/sM8inIb2x2b462wydSEFyOyuDKI1cjiVIIpM=
github.com/waku-org/go-zerokit-rln v0.1.7-wakuorg h1:2vVIBCtBih2w1K9ll8YnToTDZvbxcgbsClsPlJS/kkg=
github.com/waku-org/go-zerokit-rln v0.1.7-wakuorg/go.mod h1:GlyaVeEWNEBxVJrWC6jFTvb4LNb9d9qnjdS6EiWVUvk=
github.com/wealdtech/go-ens/v3 v3.5.0 h1:Huc9GxBgiGweCOGTYomvsg07K2QggAqZpZ5SuiZdC8o=

View File

@ -75,12 +75,17 @@ 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 if len(multiaddrRaw) < 2 {
} else {
// No multiaddr entry on enr
return result, nil
}
}
if len(multiaddrRaw) < 2 {
// There was no error loading the multiaddr field, but its length is incorrect
return result, nil
}
hostInfo, err := multiaddr.NewMultiaddr(fmt.Sprintf("/p2p/%s", peerID.Pretty()))
if err != nil {
return nil, err

2
vendor/modules.txt vendored
View File

@ -985,7 +985,7 @@ github.com/vacp2p/mvds/transport
github.com/waku-org/go-discover/discover
github.com/waku-org/go-discover/discover/v4wire
github.com/waku-org/go-discover/discover/v5wire
# github.com/waku-org/go-waku v0.4.1-0.20230209220220-57d707ff5068
# github.com/waku-org/go-waku v0.4.1-0.20230213133834-a3f08943acb4
## explicit; go 1.18
github.com/waku-org/go-waku/logging
github.com/waku-org/go-waku/waku/persistence