adding discv5Discovery param

This commit is contained in:
Gabriel mermelstein 2024-10-08 16:29:15 +03:00
parent 4fa26147e8
commit a4ac3278f0
No known key found for this signature in database
GPG Key ID: 82B8134785FEAE0D
2 changed files with 5 additions and 3 deletions

View File

@ -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),

View File

@ -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)