From 8851e4bf78cbdaefe71b9f074a3d6bfc922e042e Mon Sep 17 00:00:00 2001 From: sukun Date: Mon, 17 Jul 2023 17:18:25 +0530 Subject: [PATCH] basichost: remove invalid comment This was copied from RoutedHost.NewStream. It is only relevant for RoutedHost --- p2p/host/basic/basic_host.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/p2p/host/basic/basic_host.go b/p2p/host/basic/basic_host.go index 89f5d28db9..79f02e2c51 100644 --- a/p2p/host/basic/basic_host.go +++ b/p2p/host/basic/basic_host.go @@ -629,9 +629,6 @@ func (h *BasicHost) RemoveStreamHandler(pid protocol.ID) { // to create one. If ProtocolID is "", writes no header. // (Thread-safe) func (h *BasicHost) NewStream(ctx context.Context, p peer.ID, pids ...protocol.ID) (network.Stream, error) { - // Ensure we have a connection, with peer addresses resolved by the routing system (#207) - // It is not sufficient to let the underlying host connect, it will most likely not have - // any addresses for the peer without any prior connections. // If the caller wants to prevent the host from dialing, it should use the NoDial option. if nodial, _ := network.GetNoDial(ctx); !nodial { err := h.Connect(ctx, peer.AddrInfo{ID: p})