* Added FAIL line if peer count gets to low (restart)

* Improved debugging.
 * reduced random search 0.2 -> 0.1



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-peernet@4353 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-06-29 10:07:09 +00:00
parent 70ff44f9ef
commit ccd38a821d
2 changed files with 12 additions and 3 deletions

View File

@ -538,7 +538,10 @@ void bdConnectManager::updatePotentialConnectionProxy(const bdId *id, uint32_t m
if (mode & BITDHT_PEER_STATUS_DHT_ENGINE_VERSION)
{
#ifdef DEBUG_NODE_CONNECTION
std::cerr << "bdConnectManager::updatePotentialConnectionProxy() Peer is GOOD, checking Connection Requests";
std::cerr << "bdConnectManager::updatePotentialConnectionProxy() Peer is GOOD : ";
bdStdPrintId(std::cerr, id);
std::cerr << std::endl;
std::cerr << "bdConnectManager::updatePotentialConnectionProxy() checking Connection Requests";
std::cerr << std::endl;
#endif
/* good peer, see if any of our connectionrequests can use it */

View File

@ -377,10 +377,16 @@ void bdNodeManager::iteration()
std::cerr << std::endl;
#endif
status();
status(); /* calculates mNetworkSize */
mAccount.printStats(std::cerr);
/* Finally, Fail, and restart if we lose all peers */
if (mNetworkSize < MIN_OP_SPACE_SIZE)
{
mMode = BITDHT_MGR_STATE_FAILED;
mModeTS = now;
}
}
break;
@ -423,7 +429,7 @@ void bdNodeManager::iteration()
* should use fn calls into their functions for good generality
*/
#define RANDOM_SEARCH_FRAC (0.2)
#define RANDOM_SEARCH_FRAC (0.1)
int bdNodeManager::QueryRandomLocalNet()
{