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-addrutil
Commits
9141de32
Commit
9141de32
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
cbc0086a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
9 deletions
+3
-9
addr.go
addr.go
+2
-2
addr_test.go
addr_test.go
+1
-7
No files found.
addr.go
View file @
9141de32
...
...
@@ -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_test.go
View file @
9141de32
...
...
@@ -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
{})
...
...
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