Skip to content

Commit bbd84dc

Browse files
committed
discv5: remove fallback IP and port configuration
1 parent db7fab4 commit bbd84dc

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

discv5/driver_crawler.go

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -265,20 +265,9 @@ func (d *CrawlDriver) NewWorker() (core.Worker[PeerInfo, core.CrawlResult[PeerIn
265265

266266
ethNode := enode.NewLocalNode(d.peerstore, priv)
267267

268-
// I'm not really sure if the below is strictly necessary.
269-
udpAddr := conn.LocalAddr().(*net.UDPAddr)
270-
if udpAddr.IP.IsUnspecified() {
271-
ethNode.SetFallbackIP(net.ParseIP("127.0.0.1"))
272-
} else {
273-
ethNode.SetFallbackIP(udpAddr.IP)
274-
}
275-
ethNode.SetFallbackUDP(udpAddr.Port)
276-
277268
cfg := discover.Config{
278-
PrivateKey: priv,
279-
ValidSchemes: enode.ValidSchemes,
280-
NoFindnodeLivenessCheck: true,
281-
RefreshInterval: 100 * time.Hour, // turn off
269+
PrivateKey: priv,
270+
ValidSchemes: enode.ValidSchemes,
282271
}
283272
listener, err := discover.ListenV5(conn, ethNode, cfg)
284273
if err != nil {

0 commit comments

Comments
 (0)