Repository: ethereum/go-ethereum (language: go)

Issue:
Dialer not use discv5
Seem that discv5 source is not used anywhere, the last PR https://github.com/ethereum/go-ethereum/pull/30302 removes the `DialCandidates` of the eth protocol that includes discv5 source but that change is not mentioned in the description


Discussion / hints:
WDYM? the linked PR adds discv5 as a nodes source for the dialer! 
But seems that it is not passed to the dialer via `DialCandidates`, you can check this line https://github.com/ethereum/go-ethereum/pull/30302/files#diff-5beb4052baf94e3025566d929c63974350e4b1eae18cce8eb21b4579d6788ffeL117
I checked and I agree the naming is confusing there. The `dnsdisc` there is the name of the function parameter of `MakeProtocols`, and we pass `Ethereum.discmix` to it. The discv5 iterator is a part of this `discmix`.

The parameter name should be updated. I just left it as-is from before, but that's confusing.
yeah, I see the discv5 iterator is added to `Ethereum.discmix`, but the `dnsdisc` is not used in `eth.MakeProtocols` (the previous version is passed to the dialer via `DialCandidates`, which will be added to `p2p.Server.discmix` and then dialer use that `discmix` to try dialing). So, in this case, the discv5 iterator is useless

Fix patch:
diff --git a/eth/protocols/eth/handler.go b/eth/protocols/eth/handler.go
index d6cd83373bfd..a0848137fadd 100644
--- a/eth/protocols/eth/handler.go
+++ b/eth/protocols/eth/handler.go
@@ -89,7 +89,7 @@ type TxPool interface {
 }
 
 // MakeProtocols constructs the P2P protocol definitions for `eth`.
-func MakeProtocols(backend Backend, network uint64, dnsdisc enode.Iterator) []p2p.Protocol {
+func MakeProtocols(backend Backend, network uint64, disc enode.Iterator) []p2p.Protocol {
 	protocols := make([]p2p.Protocol, 0, len(ProtocolVersions))
 	for _, version := range ProtocolVersions {
 		protocols = append(protocols, p2p.Protocol{
@@ -110,7 +110,8 @@ func MakeProtocols(backend Backend, network uint64, dnsdisc enode.Iterator) []p2
 			PeerInfo: func(id enode.ID) interface{} {
 				return backend.PeerInfo(id)
 			},
-			Attributes: []enr.Entry{currentENREntry(backend.Chain())},
+			DialCandidates: disc,
+			Attributes:     []enr.Entry{currentENREntry(backend.Chain())},
 		})
 	}
 	return protocols


Test patch: