diff --git a/wakuv2/nwaku.go b/wakuv2/nwaku.go index ac6d82601..96de43ad8 100644 --- a/wakuv2/nwaku.go +++ b/wakuv2/nwaku.go @@ -1676,7 +1676,8 @@ type WakuConfig struct { DnsDiscovery string `json:"dnsDiscovery,omitempty"` DnsDiscoveryUrl string `json:"dnsDiscoveryUrl,omitempty"` MaxMessageSize string `json:"maxMessageSize,omitempty"` - DiscV5BootstrapNodes []string `json:"discv5BootstrapNodes,omitempty"` + Discv5BootstrapNodes []string `json:"discv5BootstrapNodes,omitempty"` + Discv5Discovery bool `json:"discv5Discovery,omitempty"` } type Waku struct { @@ -1834,7 +1835,7 @@ func wakuNew(nodeKey *ecdsa.PrivateKey, timesource: ts, storeMsgIDsMu: sync.RWMutex{}, logger: logger, - discV5BootstrapNodes: cfg.DiscV5BootstrapNodes, + discV5BootstrapNodes: cfg.Discv5BootstrapNodes, onHistoricMessagesRequestFailed: onHistoricMessagesRequestFailed, onPeerStats: onPeerStats, onlineChecker: onlinechecker.NewDefaultOnlineChecker(false).(*onlinechecker.DefaultOnlineChecker), diff --git a/wakuv2/nwaku_test.go b/wakuv2/nwaku_test.go index be33fa890..7bccfc2ae 100644 --- a/wakuv2/nwaku_test.go +++ b/wakuv2/nwaku_test.go @@ -190,7 +190,8 @@ func TestBasicWakuV2(t *testing.T) { NodeKey: "11d0dcea28e86f81937a3bd1163473c7fbc0a0db54fd72914849bc47bdf78710", EnableRelay: true, LogLevel: "DEBUG", - DiscV5BootstrapNodes: []string{nwakuInfo.EnrUri}, + Discv5BootstrapNodes: []string{nwakuInfo.EnrUri}, + Discv5Discovery: true, } w, err := New(nil, "", &nwakuConfig, nil, nil, nil, nil, nil)