You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #15486: [addrman, net] Ensure tried collisions resolve, and allow feeler connections to existing outbound netgroups
20e6ea2 [addrman] Improve collision logging and address nits (Suhas Daftuar)
f71fdda [addrman] Ensure collisions eventually get resolved (Suhas Daftuar)
4991e3c [net] feeler connections can be made to outbound peers in same netgroup (Suhas Daftuar)
4d83401 [addrman] Improve tried table collision logging (Suhas Daftuar)
Pull request description:
The restriction on outbound peers sharing the same network group is not intended to apply to feeler connections, so fix this.
This fixes an issue where a tried table collision with an entry to a netgroup we already have an outbound connection to could cause feelers to stop working, because the tried collision buffer (`m_tried_collisions`) would never be drained.
Also, ensure that all entries don't linger in `m_tried_collisions` by evicting an old entry if its collisions is unresolved after 40 minutes.
Tree-SHA512: 553fe2b01b82cd7f0f62f90c6781e373455a45b254e3bec085b5e6b16690aa9f3938e8c50e7136f19dafa250ed4578a26227d944b76daf9ce4ef0c75802389b6
// Will moving this address into tried evict another entry?
241
241
if (test_before_evict && (vvTried[tried_bucket][tried_bucket_pos] != -1)) {
242
-
LogPrint(BCLog::ADDRMAN, "Collision inserting element into tried table, moving %s to m_tried_collisions=%d\n", addr.ToString(), m_tried_collisions.size());
242
+
// Output the entry we'd be colliding with, for debugging purposes
243
+
auto colliding_entry = mapInfo.find(vvTried[tried_bucket][tried_bucket_pos]);
244
+
LogPrint(BCLog::ADDRMAN, "Collision inserting element into tried table (%s), moving %s to m_tried_collisions=%d\n", colliding_entry != mapInfo.end() ? colliding_entry->second.ToString() : "", addr.ToString(), m_tried_collisions.size());
243
245
if (m_tried_collisions.size() < ADDRMAN_SET_TRIED_COLLISION_SIZE) {
0 commit comments