fix dht_stats_alert routing table stats for multi-homed clients (temporary hack for 1.2.x series)

This commit is contained in:
arvidn 2019-07-26 13:13:13 -07:00 committed by Arvid Norberg
parent 71c980957c
commit 929f727a6a
1 changed files with 6 additions and 0 deletions

View File

@ -130,6 +130,12 @@ int routing_table::bucket_limit(int bucket) const
void routing_table::status(std::vector<dht_routing_bucket>& s) const
{
// TODO: This is temporary. For now, only report the largest routing table
// (of potentially multiple ones, for multi-homed systems)
// in next major version, break the ABI and support reporting all of them in
// the dht_stats_alert
if (s.size() > m_buckets.size()) return;
s.clear();
for (auto const& i : m_buckets)
{
dht_routing_bucket b;