@@ -97,7 +97,7 @@ const (
9797type serverPool struct {
9898 db ethdb.Database
9999 dbKey []byte
100- server p2p.Server
100+ server * p2p.Server
101101 quit chan struct {}
102102 wg * sync.WaitGroup
103103 connWg sync.WaitGroup
@@ -118,7 +118,7 @@ type serverPool struct {
118118}
119119
120120// newServerPool creates a new serverPool instance
121- func newServerPool (db ethdb.Database , dbPrefix []byte , server p2p.Server , topic discv5.Topic , quit chan struct {}, wg * sync.WaitGroup ) * serverPool {
121+ func newServerPool (db ethdb.Database , dbPrefix []byte , server * p2p.Server , topic discv5.Topic , quit chan struct {}, wg * sync.WaitGroup ) * serverPool {
122122 pool := & serverPool {
123123 db : db ,
124124 dbKey : append (dbPrefix , []byte (topic )... ),
@@ -139,11 +139,11 @@ func newServerPool(db ethdb.Database, dbPrefix []byte, server p2p.Server, topic
139139 pool .loadNodes ()
140140 pool .checkDial ()
141141
142- if srv , ok := pool .server .( discV5Server ); ok && srv . DiscV5 () != nil {
142+ if pool .server .DiscV5 != nil {
143143 pool .discSetPeriod = make (chan time.Duration , 1 )
144144 pool .discNodes = make (chan * discv5.Node , 100 )
145145 pool .discLookups = make (chan bool , 100 )
146- go srv . DiscV5 () .SearchTopic (topic , pool .discSetPeriod , pool .discNodes , pool .discLookups )
146+ go pool . server . DiscV5 .SearchTopic (topic , pool .discSetPeriod , pool .discNodes , pool .discLookups )
147147 }
148148
149149 go pool .eventLoop ()
0 commit comments