mirror of
https://source.quilibrium.com/quilibrium/ceremonyclient.git
synced 2024-11-11 02:35:18 +00:00
18 lines
338 B
Go
18 lines
338 B
Go
|
package autorelay
|
||
|
|
||
|
import (
|
||
|
ma "github.com/multiformats/go-multiaddr"
|
||
|
)
|
||
|
|
||
|
// Filter filters out all relay addresses.
|
||
|
func Filter(addrs []ma.Multiaddr) []ma.Multiaddr {
|
||
|
raddrs := make([]ma.Multiaddr, 0, len(addrs))
|
||
|
for _, addr := range addrs {
|
||
|
if isRelayAddr(addr) {
|
||
|
continue
|
||
|
}
|
||
|
raddrs = append(raddrs, addr)
|
||
|
}
|
||
|
return raddrs
|
||
|
}
|