Changeset View
Changeset View
Standalone View
Standalone View
src/addrman.h
Show First 20 Lines • Show All 174 Lines • ▼ Show 20 Lines | |||||
//! Convenience | //! Convenience | ||||
#define ADDRMAN_TRIED_BUCKET_COUNT (1 << ADDRMAN_TRIED_BUCKET_COUNT_LOG2) | #define ADDRMAN_TRIED_BUCKET_COUNT (1 << ADDRMAN_TRIED_BUCKET_COUNT_LOG2) | ||||
#define ADDRMAN_NEW_BUCKET_COUNT (1 << ADDRMAN_NEW_BUCKET_COUNT_LOG2) | #define ADDRMAN_NEW_BUCKET_COUNT (1 << ADDRMAN_NEW_BUCKET_COUNT_LOG2) | ||||
#define ADDRMAN_BUCKET_SIZE (1 << ADDRMAN_BUCKET_SIZE_LOG2) | #define ADDRMAN_BUCKET_SIZE (1 << ADDRMAN_BUCKET_SIZE_LOG2) | ||||
//! the maximum number of tried addr collisions to store | //! the maximum number of tried addr collisions to store | ||||
#define ADDRMAN_SET_TRIED_COLLISION_SIZE 10 | #define ADDRMAN_SET_TRIED_COLLISION_SIZE 10 | ||||
//! the maximum time we'll spend trying to resolve a tried table collision, in | |||||
//! seconds (40 minutes) | |||||
static const int64_t ADDRMAN_TEST_WINDOW = 40 * 60; | |||||
/** | /** | ||||
* Stochastical (IP) address manager | * Stochastical (IP) address manager | ||||
*/ | */ | ||||
class CAddrMan { | class CAddrMan { | ||||
protected: | protected: | ||||
//! critical section to protect the inner data structures | //! critical section to protect the inner data structures | ||||
mutable RecursiveMutex cs; | mutable RecursiveMutex cs; | ||||
▲ Show 20 Lines • Show All 465 Lines • Show Last 20 Lines |