// addrInList returns whether or not an address is part of a list. // this is useful to check if NAT is happening (or other bugs?) func addrInList(addr ma.Multiaddr, list []ma.Multiaddr) bool { for _, addr2 := range list { if addr.Equal(addr2) { return true } } return false }