mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-08 17:15:16 -04:00
Modified bitdht to enable simultaneous peer searches.
* Added maximum msg limits (20, 50, 100 msgs per sec). 50 = default. * Priority send out pings, with 10% queries. * switched bdquery list in bdnode to use pointers... so peers can be easily reordered (queue for queries). * Add all find peers, once dht initialised. * Added reset if FINDSELF fails. (don't know if this is a good idea!) * simplified DHT printouts. verbose versions are enabled with debug. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3686 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
6fb89a90b2
commit
9cf531fc9a
6 changed files with 153 additions and 32 deletions
|
@ -608,14 +608,16 @@ int bdSpace::printDHT()
|
|||
std::vector<bdBucket>::iterator it;
|
||||
std::list<bdPeer>::iterator eit;
|
||||
|
||||
fprintf(stderr, "bdSpace::printDHT()\n");
|
||||
/* iterate through the buckets, and sort by distance */
|
||||
int i = 0;
|
||||
|
||||
#ifdef BITDHT_DEBUG
|
||||
fprintf(stderr, "bdSpace::printDHT()\n");
|
||||
for(it = buckets.begin(); it != buckets.end(); it++, i++)
|
||||
{
|
||||
if (it->entries.size() > 0)
|
||||
{
|
||||
fprintf(stderr, "Bucket %d ----------------------------\n", i);
|
||||
fprintf(stderr, "Bucket %d ----------------------------\n", i);
|
||||
}
|
||||
|
||||
for(eit = it->entries.begin(); eit != it->entries.end(); eit++)
|
||||
|
@ -631,8 +633,11 @@ int bdSpace::printDHT()
|
|||
fprintf(stderr, "\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
fprintf(stderr, "--------------------------------------\n");
|
||||
fprintf(stderr, "DHT Table Summary --------------------\n");
|
||||
fprintf(stderr, "--------------------------------------\n");
|
||||
fprintf(stderr, "Summary ------------------------------\n");
|
||||
|
||||
/* little summary */
|
||||
unsigned long long sum = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue