les: fix nodiscover option (#21906)
This commit is contained in:
@ -17,7 +17,6 @@
|
||||
package les
|
||||
|
||||
import (
|
||||
"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"
|
||||
@ -35,8 +34,8 @@ func (e lesEntry) ENRKey() string {
|
||||
}
|
||||
|
||||
// setupDiscovery creates the node discovery source for the eth protocol.
|
||||
func (eth *LightEthereum) setupDiscovery(cfg *p2p.Config) (enode.Iterator, error) {
|
||||
if cfg.NoDiscovery || len(eth.config.DiscoveryURLs) == 0 {
|
||||
func (eth *LightEthereum) 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