Bitcoin Core 31.99.0
P2P Digital Currency
Classes | Variables
addrman.h File Reference
#include <netaddress.h>
#include <netgroup.h>
#include <protocol.h>
#include <streams.h>
#include <util/time.h>
#include <cstdint>
#include <memory>
#include <optional>
#include <unordered_set>
#include <utility>
#include <vector>
Include dependency graph for addrman.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  InvalidAddrManVersionError
 
struct  AddressPosition
 Location information for an address in AddrMan. More...
 
class  AddrMan
 Stochastic address manager. More...
 

Variables

static constexpr uint32_t ADDRMAN_TRIED_BUCKETS_PER_GROUP {8}
 Over how many buckets entries with tried addresses from a single group (/16 for IPv4) are spread. More...
 
static constexpr uint32_t ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP {64}
 Over how many buckets entries with new addresses originating from a single group are spread. More...
 
static constexpr int32_t ADDRMAN_NEW_BUCKETS_PER_ADDRESS {8}
 Maximum number of times an address can occur in the new table. More...
 
static constexpr auto ADDRMAN_HORIZON {30 * 24h}
 How old addresses can maximally be. More...
 
static constexpr int32_t ADDRMAN_RETRIES {3}
 After how many failed attempts we give up on a new node. More...
 
static constexpr int32_t ADDRMAN_MAX_FAILURES {10}
 How many successive failures are allowed ... More...
 
static constexpr auto ADDRMAN_MIN_FAIL {7 * 24h}
 ... in at least this duration More...
 
static constexpr auto ADDRMAN_REPLACEMENT {4h}
 How recent a successful connection should be before we allow an address to be evicted from tried. More...
 
static constexpr size_t ADDRMAN_SET_TRIED_COLLISION_SIZE {10}
 The maximum number of tried addr collisions to store. More...
 
static constexpr auto ADDRMAN_TEST_WINDOW {40min}
 The maximum time we'll spend trying to resolve a tried table collision. More...
 
static constexpr int32_t DEFAULT_ADDRMAN_CONSISTENCY_CHECKS {0}
 Default for -checkaddrman. More...
 

Variable Documentation

◆ ADDRMAN_HORIZON

constexpr auto ADDRMAN_HORIZON {30 * 24h}
staticconstexpr

How old addresses can maximally be.

Definition at line 29 of file addrman.h.

◆ ADDRMAN_MAX_FAILURES

constexpr int32_t ADDRMAN_MAX_FAILURES {10}
staticconstexpr

How many successive failures are allowed ...

Definition at line 33 of file addrman.h.

◆ ADDRMAN_MIN_FAIL

constexpr auto ADDRMAN_MIN_FAIL {7 * 24h}
staticconstexpr

... in at least this duration

Definition at line 35 of file addrman.h.

◆ ADDRMAN_NEW_BUCKETS_PER_ADDRESS

constexpr int32_t ADDRMAN_NEW_BUCKETS_PER_ADDRESS {8}
staticconstexpr

Maximum number of times an address can occur in the new table.

Definition at line 27 of file addrman.h.

◆ ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP

constexpr uint32_t ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP {64}
staticconstexpr

Over how many buckets entries with new addresses originating from a single group are spread.

Definition at line 25 of file addrman.h.

◆ ADDRMAN_REPLACEMENT

constexpr auto ADDRMAN_REPLACEMENT {4h}
staticconstexpr

How recent a successful connection should be before we allow an address to be evicted from tried.

Definition at line 37 of file addrman.h.

◆ ADDRMAN_RETRIES

constexpr int32_t ADDRMAN_RETRIES {3}
staticconstexpr

After how many failed attempts we give up on a new node.

Definition at line 31 of file addrman.h.

◆ ADDRMAN_SET_TRIED_COLLISION_SIZE

constexpr size_t ADDRMAN_SET_TRIED_COLLISION_SIZE {10}
staticconstexpr

The maximum number of tried addr collisions to store.

Definition at line 39 of file addrman.h.

◆ ADDRMAN_TEST_WINDOW

constexpr auto ADDRMAN_TEST_WINDOW {40min}
staticconstexpr

The maximum time we'll spend trying to resolve a tried table collision.

Definition at line 41 of file addrman.h.

◆ ADDRMAN_TRIED_BUCKETS_PER_GROUP

constexpr uint32_t ADDRMAN_TRIED_BUCKETS_PER_GROUP {8}
staticconstexpr

Over how many buckets entries with tried addresses from a single group (/16 for IPv4) are spread.

Definition at line 23 of file addrman.h.

◆ DEFAULT_ADDRMAN_CONSISTENCY_CHECKS

constexpr int32_t DEFAULT_ADDRMAN_CONSISTENCY_CHECKS {0}
staticconstexpr

Default for -checkaddrman.

Definition at line 53 of file addrman.h.