Skip to content

Commit

Permalink
Merge pull request #5417 from ipfs/fix/transports
Browse files Browse the repository at this point in the history
fix two transport related bugs
  • Loading branch information
Stebalien committed Sep 1, 2018
2 parents 59805f0 + 21befd5 commit 7b835e9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 6 additions & 0 deletions core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,12 @@ func (n *IpfsNode) startOnlineServices(ctx context.Context, routingOption Routin
libp2pOpts = append(libp2pOpts, libp2p.EnableRelay(opts...))
}

// disable the default listen addrs
libp2pOpts = append(libp2pOpts, libp2p.NoListenAddrs)

// explicitly enable the default transports
libp2pOpts = append(libp2pOpts, libp2p.DefaultTransports)

if cfg.Experimental.QUIC {
libp2pOpts = append(libp2pOpts, libp2p.Transport(quic.NewTransport))
}
Expand Down
11 changes: 6 additions & 5 deletions test/sharness/t0125-twonode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ test_expect_success "set up tcp testbed" '
iptb init -n 2 -p 0 -f --bootstrap=none
'

# Enable quic but don't use it yet.
test_expect_success "enable QUIC experiment" '
ipfsi 0 config --json Experimental.QUIC true &&
ipfsi 1 config --json Experimental.QUIC true
'

# test multiplex muxer
echo "Running advanced tests with mplex"
export LIBP2P_MUX_PREFS="/mplex/6.7.0"
Expand All @@ -101,11 +107,6 @@ run_advanced_test

# test QUIC
echo "Running advanced tests over QUIC"
test_expect_success "enable QUIC experiment" '
ipfsi 0 config --json Experimental.QUIC true &&
ipfsi 1 config --json Experimental.QUIC true
'

addr1='"[\"/ip4/127.0.0.1/udp/0/quic/\"]"'
addr2='"[\"/ip4/127.0.0.1/udp/0/quic/\"]"'
test_expect_success "add QUIC swarm addresses" '
Expand Down

0 comments on commit 7b835e9

Please sign in to comment.