From 89a94c53abc8df6569560b78bc9c9d27c3eeadb4 Mon Sep 17 00:00:00 2001 From: Acha Bill Date: Fri, 1 Nov 2024 14:20:14 -0400 Subject: [PATCH] Revert "fix: blocklist (#4871)" This reverts commit cc37fe79fe0b358eab711a201817aaf0d0dee4d9. --- pkg/p2p/libp2p/connections_test.go | 28 ---------------------------- pkg/p2p/libp2p/libp2p.go | 1 - 2 files changed, 29 deletions(-) diff --git a/pkg/p2p/libp2p/connections_test.go b/pkg/p2p/libp2p/connections_test.go index 22d3c0ab58d..3cee5072b96 100644 --- a/pkg/p2p/libp2p/connections_test.go +++ b/pkg/p2p/libp2p/connections_test.go @@ -599,34 +599,6 @@ func TestBlocklisting(t *testing.T) { expectPeers(t, s2) } -func TestReverseBlocklist(t *testing.T) { - t.Parallel() - - s1, overlay1 := newService(t, 1, libp2pServiceOpts{libp2pOpts: libp2p.Options{ - FullNode: true, - }}) - s2, overlay2 := newService(t, 1, libp2pServiceOpts{libp2pOpts: libp2p.Options{ - FullNode: true, - }}) - - s1Addr := serviceUnderlayAddress(t, s1) - - _, err := s2.Connect(context.Background(), s1Addr) - if err != nil { - t.Fatal(err) - } - - expectPeers(t, s1, overlay2) - expectPeersEventually(t, s2, overlay1) - - if err := s1.Blocklist(overlay2, 0, testBlocklistMsg); err != nil { - t.Fatal(err) - } - - expectPeers(t, s1) - expectPeersEventually(t, s2) -} - func TestBlocklistedPeers(t *testing.T) { t.Parallel() s1, overlay1 := newService(t, 1, libp2pServiceOpts{libp2pOpts: libp2p.Options{ diff --git a/pkg/p2p/libp2p/libp2p.go b/pkg/p2p/libp2p/libp2p.go index da620430fb6..c96a67e99cf 100644 --- a/pkg/p2p/libp2p/libp2p.go +++ b/pkg/p2p/libp2p/libp2p.go @@ -542,7 +542,6 @@ func (s *Service) handleIncoming(stream network.Stream) { } peerUserAgent := appendSpace(s.peerUserAgent(s.ctx, peerID)) - s.networkStatus.Store(int32(p2p.NetworkStatusAvailable)) loggerV1.Debug("stream handler: successfully connected to peer (inbound)", "addresses", i.BzzAddress.ShortString(), "light", i.LightString(), "user_agent", peerUserAgent) s.logger.Debug("stream handler: successfully connected to peer (inbound)", "address", i.BzzAddress.Overlay, "light", i.LightString(), "user_agent", peerUserAgent)