diff --git a/p2p/protocol.go b/p2p/protocol.go index 9438ab8e47..3049670931 100644 --- a/p2p/protocol.go +++ b/p2p/protocol.go @@ -19,6 +19,7 @@ package p2p import ( "fmt" + "github.com/ethereum/go-ethereum/p2p/discutil" "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enr" ) @@ -54,6 +55,11 @@ type Protocol struct { // but returns nil, it is assumed that the protocol handshake is still running. PeerInfo func(id enode.ID) interface{} + // DialCandidates, if non-nil, is a way to tell Server about protocol-specific nodes + // that should be dialed. The server continuously reads nodes from the iterator and + // attempts to create connections to them. + DialCandidates discutil.Iterator + // Attributes contains protocol specific information for the node record. Attributes []enr.Entry }