Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-swarm
Commits
30082adb
Commit
30082adb
authored
Jan 30, 2016
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to utp code from master of go-ipfs
parent
3b01cc27
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
13 deletions
+7
-13
addr/addr.go
addr/addr.go
+2
-2
addr/addr_test.go
addr/addr_test.go
+1
-7
dial_test.go
dial_test.go
+1
-1
swarm_addr_test.go
swarm_addr_test.go
+3
-3
No files found.
addr/addr.go
View file @
30082adb
...
...
@@ -18,8 +18,8 @@ var log = logging.Logger("github.com/ipfs/go-libp2p/p2p/net/swarm/addr")
var
SupportedTransportStrings
=
[]
string
{
"/ip4/tcp"
,
"/ip6/tcp"
,
//
"/ip4/udp/utp",
disabled because the lib is broken
//
"/ip6/udp/utp",
disabled because the lib is broken
"/ip4/udp/utp"
,
"/ip6/udp/utp"
,
// "/ip4/udp/udt", disabled because the lib doesnt work on arm
// "/ip6/udp/udt", disabled because the lib doesnt work on arm
}
...
...
addr/addr_test.go
View file @
30082adb
...
...
@@ -20,7 +20,6 @@ func TestFilterAddrs(t *testing.T) {
bad
:=
[]
ma
.
Multiaddr
{
newMultiaddr
(
t
,
"/ip4/1.2.3.4/udp/1234"
),
// unreliable
newMultiaddr
(
t
,
"/ip4/1.2.3.4/udp/1234/sctp/1234"
),
// not in manet
newMultiaddr
(
t
,
"/ip4/1.2.3.4/udp/1234/utp"
),
// utp is broken
newMultiaddr
(
t
,
"/ip4/1.2.3.4/udp/1234/udt"
),
// udt is broken on arm
newMultiaddr
(
t
,
"/ip6/fe80::1/tcp/1234"
),
// link local
newMultiaddr
(
t
,
"/ip6/fe80::100/tcp/1234"
),
// link local
...
...
@@ -29,6 +28,7 @@ func TestFilterAddrs(t *testing.T) {
good
:=
[]
ma
.
Multiaddr
{
newMultiaddr
(
t
,
"/ip4/127.0.0.1/tcp/1234"
),
newMultiaddr
(
t
,
"/ip6/::1/tcp/1234"
),
newMultiaddr
(
t
,
"/ip4/1.2.3.4/udp/1234/utp"
),
}
goodAndBad
:=
append
(
good
,
bad
...
)
...
...
@@ -39,18 +39,12 @@ func TestFilterAddrs(t *testing.T) {
if
AddrUsable
(
a
,
false
)
{
t
.
Errorf
(
"addr %s should be unusable"
,
a
)
}
if
AddrUsable
(
a
,
true
)
{
t
.
Errorf
(
"addr %s should be unusable"
,
a
)
}
}
for
_
,
a
:=
range
good
{
if
!
AddrUsable
(
a
,
false
)
{
t
.
Errorf
(
"addr %s should be usable"
,
a
)
}
if
!
AddrUsable
(
a
,
true
)
{
t
.
Errorf
(
"addr %s should be usable"
,
a
)
}
}
subtestAddrsEqual
(
t
,
FilterUsableAddrs
(
bad
),
[]
ma
.
Multiaddr
{})
...
...
dial_test.go
View file @
30082adb
...
...
@@ -151,7 +151,7 @@ func TestDialWait(t *testing.T) {
func
TestDialBackoff
(
t
*
testing
.
T
)
{
// t.Skip("skipping for another test")
if
ci
.
IsRunning
()
{
t
.
Skip
(
"travis
and jenkins
will never have fun with this test"
)
t
.
Skip
(
"travis will never have fun with this test"
)
}
t
.
Parallel
()
...
...
swarm_addr_test.go
View file @
30082adb
...
...
@@ -25,7 +25,6 @@ func TestFilterAddrs(t *testing.T) {
bad
:=
[]
ma
.
Multiaddr
{
m
(
"/ip4/1.2.3.4/udp/1234"
),
// unreliable
m
(
"/ip4/1.2.3.4/udp/1234/sctp/1234"
),
// not in manet
m
(
"/ip4/1.2.3.4/udp/1234/utp"
),
// utp is broken
m
(
"/ip4/1.2.3.4/udp/1234/udt"
),
// udt is broken on arm
m
(
"/ip6/fe80::1/tcp/0"
),
// link local
m
(
"/ip6/fe80::100/tcp/1234"
),
// link local
...
...
@@ -34,6 +33,7 @@ func TestFilterAddrs(t *testing.T) {
good
:=
[]
ma
.
Multiaddr
{
m
(
"/ip4/127.0.0.1/tcp/0"
),
m
(
"/ip6/::1/tcp/0"
),
m
(
"/ip4/1.2.3.4/udp/1234/utp"
),
}
goodAndBad
:=
append
(
good
,
bad
...
)
...
...
@@ -41,13 +41,13 @@ func TestFilterAddrs(t *testing.T) {
// test filters
for
_
,
a
:=
range
bad
{
if
addrutil
.
AddrUsable
(
a
,
tru
e
)
{
if
addrutil
.
AddrUsable
(
a
,
fals
e
)
{
t
.
Errorf
(
"addr %s should be unusable"
,
a
)
}
}
for
_
,
a
:=
range
good
{
if
!
addrutil
.
AddrUsable
(
a
,
tru
e
)
{
if
!
addrutil
.
AddrUsable
(
a
,
fals
e
)
{
t
.
Errorf
(
"addr %s should be usable"
,
a
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment