Commit e6b1e07f authored by Can ZHANG's avatar Can ZHANG
Browse files

Updates due to code review

parent ef51fdbe
......@@ -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)
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment