|
|
@ -259,6 +259,7 @@ public: |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
bool TestNode(const CIPPort &cip, int &ban, int &clientV, vector<CAddress>& vAddr) { |
|
|
|
bool TestNode(const CIPPort &cip, int &ban, int &clientV, vector<CAddress>& vAddr) { |
|
|
|
|
|
|
|
try { |
|
|
|
CNode node(cip, vAddr); |
|
|
|
CNode node(cip, vAddr); |
|
|
|
bool ret = node.Run(); |
|
|
|
bool ret = node.Run(); |
|
|
|
if (!ret) { |
|
|
|
if (!ret) { |
|
|
@ -269,6 +270,10 @@ bool TestNode(const CIPPort &cip, int &ban, int &clientV, vector<CAddress>& vAdd |
|
|
|
clientV = node.GetClientVersion(); |
|
|
|
clientV = node.GetClientVersion(); |
|
|
|
// printf("%s: %s!!!\n", cip.ToString().c_str(), ret ? "GOOD" : "BAD");
|
|
|
|
// printf("%s: %s!!!\n", cip.ToString().c_str(), ret ? "GOOD" : "BAD");
|
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
|
|
|
|
} catch(std::ios_base::failure& e) { |
|
|
|
|
|
|
|
ban = 0; |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|