mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-09 06:18:02 +00:00
yet another ThreadMaintainDHTNodes heuristic improvement
This commit is contained in:
parent
68f3e97e65
commit
549ba353dd
@ -1235,7 +1235,7 @@ namespace libtorrent
|
||||
, coalesce_writes(false)
|
||||
, outgoing_ports(0,0)
|
||||
, peer_tos(0)
|
||||
, active_downloads(3)
|
||||
, active_downloads(6)
|
||||
, active_seeds(5)
|
||||
, active_dht_limit(88) // don't announce more than once every 40 seconds
|
||||
, active_tracker_limit(1600) // don't announce to trackers more than once every 1.125 seconds
|
||||
|
@ -258,7 +258,7 @@ void ThreadMaintainDHTNodes()
|
||||
vector<CAddress> vAddr = addrman.GetAddr();
|
||||
int totalNodesCandidates = (int)(vNodes.size() + vAddr.size());
|
||||
if( (!dht_nodes && totalNodesCandidates) ||
|
||||
dht_nodes < totalNodesCandidates / 2 ) {
|
||||
(dht_nodes < 5 && totalNodesCandidates > 10) ) {
|
||||
printf("ThreadMaintainDHTNodes: too few dht_nodes, trying to add some...\n");
|
||||
BOOST_FOREACH(const CAddress &a, vAddr) {
|
||||
std::string addr = a.ToStringIP();
|
||||
|
Loading…
Reference in New Issue
Block a user