mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
p2p: improve dialTask docs
Also increase log level for "Can't resolve node"
This commit is contained in:
parent
6353685608
commit
8cefa07079
1 changed files with 8 additions and 7 deletions
15
p2p/dial.go
15
p2p/dial.go
|
|
@ -425,14 +425,15 @@ func (d *dialScheduler) startDial(task *dialTask) {
|
|||
}()
|
||||
}
|
||||
|
||||
// A dialTask is generated for each node that is dialed. All fields except
|
||||
// staticPoolIndex cannot be accessed while the task is running.
|
||||
// A dialTask generated for each node that is dialed.
|
||||
type dialTask struct {
|
||||
flags connFlag
|
||||
dest *enode.Node
|
||||
lastResolved mclock.AbsTime
|
||||
resolveDelay time.Duration
|
||||
staticPoolIndex int
|
||||
flags connFlag
|
||||
// These fields are private to the task and should not be
|
||||
// accessed by dialScheduler while the task is running.
|
||||
dest *enode.Node
|
||||
lastResolved mclock.AbsTime
|
||||
resolveDelay time.Duration
|
||||
}
|
||||
|
||||
func newDialTask(dest *enode.Node, flags connFlag) *dialTask {
|
||||
|
|
@ -470,7 +471,7 @@ func (t *dialTask) run(d *dialScheduler) {
|
|||
// The backoff delay resets when the node is found.
|
||||
func (t *dialTask) resolve(d *dialScheduler) bool {
|
||||
if d.resolver == nil {
|
||||
d.log.Debug("Can't resolve node", "id", t.dest.ID(), "err", "discovery is disabled")
|
||||
d.log.Trace("Can't resolve node", "id", t.dest.ID(), "err", "discovery is disabled")
|
||||
return false
|
||||
}
|
||||
if t.resolveDelay == 0 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue