Skip to content

Commit

Permalink
fix dht_stats_alert routing table stats for multi-homed clients (temp…
Browse files Browse the repository at this point in the history
…orary hack for 1.2.x series)
  • Loading branch information
arvidn committed Jul 27, 2019
1 parent 71c9809 commit 929f727
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/kademlia/routing_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 929f727

Please sign in to comment.