mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
p2p: adapt to new iterator interface
This commit is contained in:
parent
1fa2bf9e4e
commit
3498a73ec8
1 changed files with 2 additions and 5 deletions
|
|
@ -17,7 +17,6 @@
|
|||
package p2p
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
|
|
@ -327,13 +326,11 @@ type discoverTask struct {
|
|||
}
|
||||
|
||||
func (t *discoverTask) Do(srv *Server) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), discoveryTimeout)
|
||||
defer cancel()
|
||||
t.results = discutil.ReadNodes(ctx, srv.discmix, t.want)
|
||||
t.results = discutil.ReadNodes(srv.discmix, t.want)
|
||||
}
|
||||
|
||||
func (t *discoverTask) String() string {
|
||||
s := "discovery lookup"
|
||||
s := "discovery query"
|
||||
if len(t.results) > 0 {
|
||||
s += fmt.Sprintf(" (%d results)", len(t.results))
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue