les: fix nodiscover option (#21906)
This commit is contained in:
@ -19,7 +19,6 @@ package eth
|
||||
import (
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
"github.com/ethereum/go-ethereum/core/forkid"
|
||||
"github.com/ethereum/go-ethereum/p2p"
|
||||
"github.com/ethereum/go-ethereum/p2p/dnsdisc"
|
||||
"github.com/ethereum/go-ethereum/p2p/enode"
|
||||
"github.com/ethereum/go-ethereum/rlp"
|
||||
@ -65,8 +64,8 @@ func (eth *Ethereum) currentEthEntry() *ethEntry {
|
||||
}
|
||||
|
||||
// setupDiscovery creates the node discovery source for the eth protocol.
|
||||
func (eth *Ethereum) setupDiscovery(cfg *p2p.Config) (enode.Iterator, error) {
|
||||
if cfg.NoDiscovery || len(eth.config.DiscoveryURLs) == 0 {
|
||||
func (eth *Ethereum) setupDiscovery() (enode.Iterator, error) {
|
||||
if len(eth.config.DiscoveryURLs) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
client := dnsdisc.NewClient(dnsdisc.Config{})
|
||||
|
Reference in New Issue
Block a user