aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.h
diff options
context:
space:
mode:
authorSuhas Daftuar <[email protected]>2019-02-26 16:34:26 -0500
committerSuhas Daftuar <[email protected]>2019-02-27 16:53:44 -0500
commitf71fdda3bc2e7acd2a8b74e882364866b8b0f55b (patch)
treee022ff5d8909a1aac79dc30346450961cd7f07a6 /src/addrman.h
parent[net] feeler connections can be made to outbound peers in same netgroup (diff)
downloaddiscoin-f71fdda3bc2e7acd2a8b74e882364866b8b0f55b.tar.xz
discoin-f71fdda3bc2e7acd2a8b74e882364866b8b0f55b.zip
[addrman] Ensure collisions eventually get resolved
After 40 minutes, time out a test-before-evict entry and just evict without testing. Otherwise, if we were unable to test an entry for some reason, we might break using feelers altogether.
Diffstat (limited to 'src/addrman.h')
-rw-r--r--src/addrman.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/addrman.h b/src/addrman.h
index 003bd059f..e54184ce3 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -166,6 +166,9 @@ public:
//! the maximum number of tried addr collisions to store
#define ADDRMAN_SET_TRIED_COLLISION_SIZE 10
+//! the maximum time we'll spend trying to resolve a tried table collision, in seconds
+static const int64_t ADDRMAN_TEST_WINDOW = 40*60; // 40 minutes
+
/**
* Stochastical (IP) address manager
*/