remove empty buckets after load DHT nodes

This commit is contained in:
orignal
2026-09-28 22:37:42 -04:00
parent 19c0f98126
commit 14eb418c5e
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -498,6 +498,7 @@ namespace torrents
}
}
}
m_RoutingTable->RemoveEmptyBuckets ();
if (numLoaded > 0)
LogPrint (eLogInfo, "TorrentsDHT: ", numLoaded, " DHT nodes loaded");
}
+1 -1
View File
@@ -123,11 +123,11 @@ namespace torrents
std::list<std::pair<NodeID, NodeID> > GetExploratoryTargets (std::mt19937& rng) const; // (target, node to send find_node to)
NodeID FindClosestNodeInBucket (const NodeID& target) const;
std::list<NodeID> DeleteExpiredNodes (uint64_t ts);
void RemoveEmptyBuckets ();
private:
Bucket * FindBucket (const Torrent::InfoHash& id) const;
void RemoveEmptyBuckets ();
private: