Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
e6b1e07f
Commit
e6b1e07f
authored
Sep 13, 2018
by
Can ZHANG
Browse files
Updates due to code review
parent
ef51fdbe
Changes
1
Show whitespace changes
Inline
Side-by-side
p2p/host/basic/basic_host.go
View file @
e6b1e07f
...
...
@@ -474,10 +474,11 @@ func mergeAddrs(addrLists ...[]ma.Multiaddr) (uniqueAddrs []ma.Multiaddr) {
exists
:=
make
(
map
[
string
]
bool
)
for
_
,
addrList
:=
range
addrLists
{
for
_
,
addr
:=
range
addrList
{
if
exists
[
addr
.
String
()]
{
k
:=
string
(
addr
.
Bytes
())
if
exists
[
k
]
{
continue
}
exists
[
addr
.
String
()
]
=
true
exists
[
k
]
=
true
uniqueAddrs
=
append
(
uniqueAddrs
,
addr
)
}
}
...
...
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