Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkg/p2p/libp2p/libp2p_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ func newService(t *testing.T, networkID uint64, o libp2pServiceOpts) (s *libp2p.
t.Fatal(err)
}

addr := ":0"
// Bind loopback only so host.Addrs() stays small and independent of the
// machine's docker/bridge NICs. Handshake truncates underlays to
// maxUnderlaysPerPeer; listening on :0 expands to every local interface
// and breaks addressbook equality checks on hosts with many addresses.
addr := "127.0.0.1:0"

if o.Logger == nil {
o.Logger = log.Noop
Expand Down
Loading