|
@ -343,11 +343,18 @@ void Host::populateAddresses() |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
shared_ptr<Node> Host::noteNode(NodeId _id, bi::tcp::endpoint const& _a, Origin _o, bool _ready, NodeId _oldId) |
|
|
shared_ptr<Node> Host::noteNode(NodeId _id, bi::tcp::endpoint _a, Origin _o, bool _ready, NodeId _oldId) |
|
|
{ |
|
|
{ |
|
|
RecursiveGuard l(x_peers); |
|
|
RecursiveGuard l(x_peers); |
|
|
if (_a.port() < 30300 && _a.port() > 30303) |
|
|
if (_a.port() < 30300 && _a.port() > 30303) |
|
|
cwarn << "Wierd port being recorded!"; |
|
|
cwarn << "Wierd port being recorded!"; |
|
|
|
|
|
|
|
|
|
|
|
if (_a.port() >= 49152) |
|
|
|
|
|
{ |
|
|
|
|
|
cwarn << "Private port being recorded - setting to 0"; |
|
|
|
|
|
_a = bi::tcp::endpoint(_a.address(), 0); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
cnote << "Node:" << _id.abridged() << _a << (_ready ? "ready" : "used") << _oldId.abridged() << (m_nodes.count(_id) ? "[have]" : "[NEW]"); |
|
|
cnote << "Node:" << _id.abridged() << _a << (_ready ? "ready" : "used") << _oldId.abridged() << (m_nodes.count(_id) ? "[have]" : "[NEW]"); |
|
|
if (!_a.port()) |
|
|
if (!_a.port()) |
|
|
{ |
|
|
{ |
|
|