mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
p2p/discover: fix crash in move
This commit is contained in:
parent
b44673fa29
commit
822b05926f
1 changed files with 3 additions and 4 deletions
|
|
@ -132,11 +132,10 @@ func (tr *tableRevalidation) handleResponse(tab *Table, resp revalidationRespons
|
||||||
if !resp.didRespond {
|
if !resp.didRespond {
|
||||||
// Revalidation failed.
|
// Revalidation failed.
|
||||||
n.livenessChecks /= 3
|
n.livenessChecks /= 3
|
||||||
if n.livenessChecks == 0 || resp.isNewNode {
|
if n.livenessChecks <= 0 {
|
||||||
tab.deleteInBucket(b, n.ID())
|
tab.deleteInBucket(b, n.ID())
|
||||||
}
|
} else if !resp.isNewNode {
|
||||||
// Move to fast queue.
|
// Move to fast queue.
|
||||||
if !resp.isNewNode {
|
|
||||||
tr.moveToList(&tr.fast, &tr.slow, n, now, &tab.rand)
|
tr.moveToList(&tr.fast, &tr.slow, n, now, &tab.rand)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue