From abfc022212c4a68100ad9d7070e77aa1572d02e8 Mon Sep 17 00:00:00 2001 From: Gealber Morales <48373523+Gealber@users.noreply.github.com> Date: Sun, 9 Jun 2024 22:47:51 +0200 Subject: [PATCH] p2p/discover: add missing lock when calling tab.handleAddNode (#29960) --- p2p/discover/table.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/p2p/discover/table.go b/p2p/discover/table.go index 76b5def798..3e2b52cdb3 100644 --- a/p2p/discover/table.go +++ b/p2p/discover/table.go @@ -452,7 +452,9 @@ func (tab *Table) loadSeedNodes() { addr, _ := seed.UDPEndpoint() tab.log.Trace("Found seed node in database", "id", seed.ID(), "addr", addr, "age", age) } + tab.mutex.Lock() tab.handleAddNode(addNodeOp{node: seed, isInbound: false}) + tab.mutex.Unlock() } }