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-kad-dht
Commits
6edcea2f
Unverified
Commit
6edcea2f
authored
Apr 13, 2020
by
Steven Allen
Committed by
GitHub
Apr 13, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #585 from libp2p/fix/optimize-is-relay
fix: optimize isRelay
parents
6b94711f
e774f016
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
dht_filters.go
dht_filters.go
+6
-6
No files found.
dht_filters.go
View file @
6edcea2f
...
...
@@ -166,10 +166,10 @@ func sameV6Net(a, b net.IP) bool {
}
func
isRelayAddr
(
a
ma
.
Multiaddr
)
bool
{
fo
r
_
,
p
:=
range
a
.
Protocols
()
{
if
p
.
Code
==
ma
.
P_CIRCUIT
{
return
true
}
}
return
f
alse
fo
und
:=
false
ma
.
ForEach
(
a
,
func
(
c
ma
.
Component
)
bool
{
found
=
c
.
Protocol
()
.
Code
==
ma
.
P_CIRCUIT
return
!
found
}
)
return
f
ound
}
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