From 44afa2466d8197d374007258cbb3c549ec5bbfd8 Mon Sep 17 00:00:00 2001 From: wizeguyy Date: Thu, 21 Sep 2023 16:40:03 -0500 Subject: [PATCH] Skip own enode in static-nodes.json --- p2p/server.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/p2p/server.go b/p2p/server.go index b90cb98782..e44760a95d 100644 --- a/p2p/server.go +++ b/p2p/server.go @@ -632,7 +632,10 @@ func (srv *Server) setupDialScheduler() { } srv.dialsched = newDialScheduler(config, srv.discmix, srv.SetupConn) for _, n := range srv.StaticNodes { - srv.dialsched.addStatic(n) + // If our own enode is int he StaticNodes list, skip it + if !srv.localnode.Node().Pubkey().Equal(n.Pubkey()) { + srv.dialsched.addStatic(n) + } } }