go-ethereum/p2p/discover
Daniel Knopik de6d597679
p2p/discover: schedule revalidation also when all nodes are excluded (#30239)
## Issue

If `nextTime` has passed, but all nodes are excluded, `get` would return
`nil` and `run` would therefore not invoke `schedule`. Then, we schedule
a timer for the past, as neither `nextTime` value has been updated. This
creates a busy loop, as the timer immediately returns.

## Fix

With this PR, revalidation will be also rescheduled when all nodes are
excluded.

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
2024-07-31 21:38:23 +02:00
..
v4wire p2p/discover: refactor node and endpoint representation (#29844) 2024-05-29 15:02:26 +02:00
v5wire p2p: use netip.Addr where possible (#29891) 2024-06-05 19:31:04 +02:00
common.go p2p/discover: refactor node and endpoint representation (#29844) 2024-05-29 15:02:26 +02:00
lookup.go p2p/discover: refactor node and endpoint representation (#29844) 2024-05-29 15:02:26 +02:00
metrics.go p2p/discover: refactor node and endpoint representation (#29844) 2024-05-29 15:02:26 +02:00
node.go p2p/discover: remove type encPubkey (#30172) 2024-07-18 11:09:02 +02:00
ntp.go all: remove dependency on golang.org/exp (#29314) 2024-03-25 07:50:18 +01:00
table.go p2p/discover: add missing lock when calling tab.handleAddNode (#29960) 2024-06-09 22:47:51 +02:00
table_reval.go p2p/discover: schedule revalidation also when all nodes are excluded (#30239) 2024-07-31 21:38:23 +02:00
table_reval_test.go p2p/discover: refactor node and endpoint representation (#29844) 2024-05-29 15:02:26 +02:00
table_test.go p2p/discover: improve flaky revalidation tests (#30023) 2024-06-21 15:29:07 +02:00
table_util_test.go p2p/discover: remove type encPubkey (#30172) 2024-07-18 11:09:02 +02:00
v4_lookup_test.go p2p/discover: remove type encPubkey (#30172) 2024-07-18 11:09:02 +02:00
v4_udp.go p2p/discover: remove type encPubkey (#30172) 2024-07-18 11:09:02 +02:00
v4_udp_test.go p2p/discover: remove type encPubkey (#30172) 2024-07-18 11:09:02 +02:00
v5_talk.go p2p/discover: refactor node and endpoint representation (#29844) 2024-05-29 15:02:26 +02:00
v5_udp.go p2p/discover: unwrap 4-in-6 UDP source addresses (#29944) 2024-06-06 16:15:22 +03:00
v5_udp_test.go p2p/discover: remove type encPubkey (#30172) 2024-07-18 11:09:02 +02:00