Skip to content

Commit

Permalink
Revert "fix: blocklist (#4871)"
Browse files Browse the repository at this point in the history
This reverts commit cc37fe7.
  • Loading branch information
acha-bill committed Nov 1, 2024
1 parent e161ee8 commit 89a94c5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
28 changes: 0 additions & 28 deletions pkg/p2p/libp2p/connections_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
1 change: 0 additions & 1 deletion pkg/p2p/libp2p/libp2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 89a94c5

Please sign in to comment.