Add TCP channel support for supernode list, make Peer pick the first path if all paths are equally dead.
This commit is contained in:
@@ -63,7 +63,7 @@ public:
|
||||
*
|
||||
* @param sn Supernodes for this network
|
||||
*/
|
||||
void setSupernodes(const std::map< Identity,std::vector<InetAddress> > &sn);
|
||||
void setSupernodes(const std::map< Identity,std::vector< std::pair<InetAddress,bool> > > &sn);
|
||||
|
||||
/**
|
||||
* Add a peer to database
|
||||
@@ -103,15 +103,6 @@ public:
|
||||
*/
|
||||
void saveIdentity(const Identity &id);
|
||||
|
||||
/**
|
||||
* @return Current network supernodes
|
||||
*/
|
||||
inline std::map< Identity,std::vector<InetAddress> > supernodes() const
|
||||
{
|
||||
Mutex::Lock _l(_supernodes_m);
|
||||
return _supernodes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Vector of peers that are supernodes
|
||||
*/
|
||||
@@ -313,7 +304,7 @@ private:
|
||||
std::map< Address,SharedPtr<Peer> > _activePeers;
|
||||
Mutex _activePeers_m;
|
||||
|
||||
std::map< Identity,std::vector<InetAddress> > _supernodes;
|
||||
std::map< Identity,std::vector< std::pair<InetAddress,bool> > > _supernodes;
|
||||
std::set< Address > _supernodeAddresses;
|
||||
std::vector< SharedPtr<Peer> > _supernodePeers;
|
||||
Mutex _supernodes_m;
|
||||
|
||||
Reference in New Issue
Block a user