Open GoogleCodeExporter opened 9 years ago
diff --git a/src/kademlia/routing_table.cpp b/src/kademlia/routing_table.cpp
index 8df6cf3..4642bef 100644
--- a/src/kademlia/routing_table.cpp
+++ b/src/kademlia/routing_table.cpp
@@ -443,6 +443,8 @@ void routing_table::remove_node(node_entry* n
bool routing_table::add_node(node_entry e)
{
+ static size_t max_bucket_size = 50;
+
add_node_status_t s = add_node_impl(e);
if (s == failed_to_add) return false;
if (s == node_added) return true;
@@ -455,16 +457,11 @@ bool routing_table::add_node(node_entry e)
// harden our resistence towards this attack. Perhaps by never
// splitting a bucket (and discard nodes) if the two buckets above it
// are empty or close to empty
- TORRENT_ASSERT(m_buckets.size() <= 50);
- if (m_buckets.size() > 50)
+ //TORRENT_ASSERT(m_buckets.size() <= 100);
+ if (m_buckets.size() > max_bucket_size)
{
- // this is a sanity check. In the wild, we shouldn't
see routing
- // tables deeper than 26 or 27. If we get this deep,
there might
- // be a bug in the bucket splitting logic, or there may
be someone
- // playing a prank on us, spoofing node IDs.
- s = add_node_impl(e);
- if (s == node_added) return true;
- return false;
+ std::cerr << "max bucket limit exceeded: " <<
m_buckets.size() << std::endl;
+ max_bucket_size = m_buckets.size();
}
// if the new bucket still has too many nodes in it, we need to keep
Original comment by vanya...@gmail.com
on 16 Feb 2015 at 12:23
I'm running qbittorrent for 2 day now. And not I've a few traces. The max limit
I've got is 82:
max bucket limit exceeded: 51
max bucket limit exceeded: 52
max bucket limit exceeded: 53
max bucket limit exceeded: 54
max bucket limit exceeded: 55
max bucket limit exceeded: 56
max bucket limit exceeded: 57
max bucket limit exceeded: 58
max bucket limit exceeded: 59
max bucket limit exceeded: 60
max bucket limit exceeded: 61
max bucket limit exceeded: 62
max bucket limit exceeded: 63
max bucket limit exceeded: 64
max bucket limit exceeded: 65
max bucket limit exceeded: 66
max bucket limit exceeded: 67
max bucket limit exceeded: 68
max bucket limit exceeded: 69
max bucket limit exceeded: 70
max bucket limit exceeded: 71
max bucket limit exceeded: 72
max bucket limit exceeded: 73
max bucket limit exceeded: 74
max bucket limit exceeded: 75
max bucket limit exceeded: 76
max bucket limit exceeded: 77
max bucket limit exceeded: 78
max bucket limit exceeded: 79
max bucket limit exceeded: 80
max bucket limit exceeded: 81
max bucket limit exceeded: 82
Original comment by vanya...@gmail.com
on 17 Feb 2015 at 10:03
I wonder what the distribution of nodes look like there. do you know how many
nodes in total you have in your routing table?
Original comment by arvid.no...@gmail.com
on 17 Feb 2015 at 11:46
> do you know how many nodes in total you have in your routing table?
No. But if you send me a patch that dump necessary information, I will apply it.
Original comment by vanya...@gmail.com
on 18 Feb 2015 at 8:04
Original issue reported on code.google.com by
vanya...@gmail.com
on 16 Feb 2015 at 12:03