From 685142e7b743cdf344db20996c2db28b907d0d06 Mon Sep 17 00:00:00 2001 From: Andrea Maria Piana Date: Fri, 9 Dec 2022 17:50:20 +0000 Subject: [PATCH] Allow to set bootnodes --- go.mod | 2 +- go.sum | 6 ++---- waku/v2/discv5/discover.go | 4 ++++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 0e9c7522..e77dd775 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( require ( github.com/gorilla/mux v1.8.0 - github.com/waku-org/go-discover v0.0.0-20221027130446-2f43d5f6c73f + github.com/waku-org/go-discover v0.0.0-20221209174356-61c833f34d98 github.com/waku-org/go-zerokit-rln v0.1.7-wakuorg github.com/waku-org/noise v1.0.2 golang.org/x/text v0.4.0 diff --git a/go.sum b/go.sum index a6f0521c..9a11a80d 100644 --- a/go.sum +++ b/go.sum @@ -1518,10 +1518,8 @@ github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmF github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/waku-org/go-discover v0.0.0-20221027130446-2f43d5f6c73f h1:YHIrSqs8Aot1exhwx0+uwdshCp3RfZu5OY6Hvt3Hk8g= -github.com/waku-org/go-discover v0.0.0-20221027130446-2f43d5f6c73f/go.mod h1:eBHgM6T4EG0RZzxpxKy+rGz/6Dw2Nd8DWxS0lm9ESDw= -github.com/waku-org/go-zerokit-rln v0.1.6 h1:r8B6S83WJIioxEj1wSruhx+eg47HpSrIwuhi6yaRvy0= -github.com/waku-org/go-zerokit-rln v0.1.6/go.mod h1:T1wLR/VuTcxLkDv0O7JvR0N/9y7GHM2IeU7LjnWZxek= +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-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/waku-org/noise v1.0.2 h1:7WmlhpJ0eliBzwzKz6SoTqQznaEU2IuebHF3oCekqqs= diff --git a/waku/v2/discv5/discover.go b/waku/v2/discv5/discover.go index 5a831ff5..0d7c790b 100644 --- a/waku/v2/discv5/discover.go +++ b/waku/v2/discv5/discover.go @@ -207,6 +207,10 @@ func (d *DiscoveryV5) Start() error { return nil } +func (d *DiscoveryV5) SetBootnodes(nodes []*enode.Node) error { + return d.listener.SetFallbackNodes(nodes) +} + func (d *DiscoveryV5) Stop() { d.Lock() defer d.Unlock()