Commit 13f9cc92 authored by tavit ohanian's avatar tavit ohanian

initial port

parent ad377594
Pipeline #844 passed with stages
in 3 minutes and 25 seconds
......@@ -59,7 +59,7 @@ type isFdConsumingFnc func(ma.Multiaddr) bool
func newDialLimiter(df dialfunc, fdFnc isFdConsumingFnc) *dialLimiter {
fd := ConcurrentFdDials
if env := os.Getenv("LIBP2P_SWARM_FD_LIMIT"); env != "" {
if env := os.Getenv("P2P_SWARM_FD_LIMIT"); env != "" {
if n, err := strconv.ParseInt(env, 10, 32); err == nil {
fd = int(n)
}
......
......@@ -99,7 +99,7 @@ type Swarm struct {
// NewSwarm constructs a Swarm.
//
// NOTE: go-libp2p will be moving to dependency injection soon. The variadic
// NOTE: go-p2p will be moving to dependency injection soon. The variadic
// `extra` interface{} parameter facilitates the future migration. Supported
// elements are:
// - connmgr.ConnectionGater
......
......@@ -719,7 +719,7 @@ func (s *Swarm) dialAddr(ctx context.Context, p peer.ID, addr ma.Multiaddr) (tra
return connC, nil
}
// TODO We should have a `IsFdConsuming() bool` method on the `Transport` interface in go-libp2p-core/transport.
// TODO We should have a `IsFdConsuming() bool` method on the `Transport` interface in go-p2p-core/transport.
// This function checks if any of the transport protocols in the address requires a file descriptor.
// For now:
// A Non-circuit address which has the TCP/UNIX protocol is deemed FD consuming.
......
......@@ -109,7 +109,7 @@ func TestNetworkOpenStream(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
testString := "hello ipfs"
testString := "hello dms3"
nets := make([]network.Network, 4)
for i := 0; i < 4; i++ {
......
......@@ -11,7 +11,7 @@ import (
"gitlab.dms3.io/p2p/go-p2p-core/protocol"
)
// Validate Stream conforms to the go-libp2p-net Stream interface
// Validate Stream conforms to the go-p2p-net Stream interface
var _ network.Stream = &Stream{}
// Stream is the stream type used by swarm. In general, you won't use this type
......
......@@ -31,7 +31,7 @@ func EchoStreamHandler(stream network.Stream) {
go func() {
defer stream.Close()
// pull out the ipfs conn
// pull out the dms3 conn
c := stream.Conn()
log.Infof("%s ponging to %s", c.LocalPeer(), c.RemotePeer())
......
......@@ -73,7 +73,7 @@ func (s *Swarm) TransportForListening(a ma.Multiaddr) transport.Transport {
// AddTransport adds a transport to this swarm.
//
// Satisfies the Network interface from go-libp2p-transport.
// Satisfies the Network interface from go-p2p-transport.
func (s *Swarm) AddTransport(t transport.Transport) error {
protocols := t.Protocols()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment