Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix two transport related bugs #5417

Merged
merged 3 commits into from
Sep 1, 2018
Merged
Show file tree
Hide file tree
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: 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