mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
p2p/discover: try to fix TestUDPv5_lookupE2E by using SetFallbackUDP (#35542)
The test set the local UDP port via ln.Set(enr.UDP(...)), but the "udp" ENR entry is owned by the endpoint predictor: as soon as the first node received a PONG, updateEndpoints recomputed the endpoint with no fallback port set and deleted the entry. Later nodes bootstrapping from that node's record then failed with "bad bootstrap node: missing UDP port". Use SetFallbackUDP like startLocalhostV4 already does, so the port survives endpoint statements. fixes CI errors like in https://github.com/ethereum/go-ethereum/actions/runs/31859911877/job/94953524792?pr=35529
This commit is contained in:
parent
35a016346f
commit
02b73d4ea7
1 changed files with 1 additions and 1 deletions
|
|
@ -90,7 +90,7 @@ func startLocalhostV5(t *testing.T, cfg Config) *UDPv5 {
|
|||
}
|
||||
realaddr := socket.LocalAddr().(*net.UDPAddr)
|
||||
ln.SetStaticIP(realaddr.IP)
|
||||
ln.Set(enr.UDP(realaddr.Port))
|
||||
ln.SetFallbackUDP(realaddr.Port)
|
||||
udp, err := ListenV5(socket, ln, cfg)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue