Skip to content

Commit b8b6d07

Browse files
fjljakub-freebit
authored andcommitted
eth/protocols/eth: add discovery iterator to protocol (ethereum#31185)
We somehow forgot to add this in ethereum#30302, so discv5 and DNS have actually been disabled since then. Fixes ethereum#31168
1 parent 1601ea4 commit b8b6d07

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

eth/protocols/eth/handler.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ type TxPool interface {
8989
}
9090

9191
// MakeProtocols constructs the P2P protocol definitions for `eth`.
92-
func MakeProtocols(backend Backend, network uint64, dnsdisc enode.Iterator) []p2p.Protocol {
92+
func MakeProtocols(backend Backend, network uint64, disc enode.Iterator) []p2p.Protocol {
9393
protocols := make([]p2p.Protocol, 0, len(ProtocolVersions))
9494
for _, version := range ProtocolVersions {
9595
protocols = append(protocols, p2p.Protocol{
@@ -110,7 +110,8 @@ func MakeProtocols(backend Backend, network uint64, dnsdisc enode.Iterator) []p2
110110
PeerInfo: func(id enode.ID) interface{} {
111111
return backend.PeerInfo(id)
112112
},
113-
Attributes: []enr.Entry{currentENREntry(backend.Chain())},
113+
DialCandidates: disc,
114+
Attributes: []enr.Entry{currentENREntry(backend.Chain())},
114115
})
115116
}
116117
return protocols

0 commit comments

Comments
 (0)