From 39333c9e8ef3a11fdf2ccad3a5bc7c17ce697bd6 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 17 Nov 2016 16:59:04 -0800 Subject: Modify unite() to deal with a second layer of upstreams. --- node/Peer.hpp | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'node/Peer.hpp') diff --git a/node/Peer.hpp b/node/Peer.hpp index be05aa3a..a7240cb4 100644 --- a/node/Peer.hpp +++ b/node/Peer.hpp @@ -403,26 +403,6 @@ public: return false; } - /** - * Find a common set of addresses by which two peers can link, if any - * - * @param a Peer A - * @param b Peer B - * @param now Current time - * @return Pair: B's address (to send to A), A's address (to send to B) - */ - static inline std::pair findCommonGround(const Peer &a,const Peer &b,uint64_t now) - { - std::pair v4,v6; - b.getBestActiveAddresses(now,v4.first,v6.first); - a.getBestActiveAddresses(now,v4.second,v6.second); - if ((v6.first)&&(v6.second)) // prefer IPv6 if both have it since NAT-t is (almost) unnecessary - return v6; - else if ((v4.first)&&(v4.second)) - return v4; - else return std::pair(); - } - private: inline uint64_t _pathScore(const unsigned int p,const uint64_t now) const { -- cgit v1.2.3