mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
p2p/discover: add neighbors reply nodes always, not just during init
This commit is contained in:
parent
b7172ee02f
commit
2d0539f2b8
1 changed files with 4 additions and 5 deletions
|
|
@ -330,12 +330,11 @@ func (tab *Table) findnode(n *Node, targetID NodeID, reply chan<- []*Node) {
|
||||||
tab.db.updateFindFails(n.ID, fails-1)
|
tab.db.updateFindFails(n.ID, fails-1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Grab as many nodes as possible if we're in the init phase.
|
// Grab as many nodes as possible. Some of them might not be alive anymore, but we'll
|
||||||
if !tab.isInitDone() {
|
// just remove those again during revalidation.
|
||||||
for _, n := range r {
|
for _, n := range r {
|
||||||
tab.add(n)
|
tab.add(n)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
reply <- r
|
reply <- r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue