Bitcoin Core 28.99.0
P2P Digital Currency
Classes | Typedefs | Variables
addrman_impl.h File Reference
#include <logging.h>
#include <logging/timer.h>
#include <netaddress.h>
#include <protocol.h>
#include <serialize.h>
#include <sync.h>
#include <uint256.h>
#include <util/time.h>
#include <cstdint>
#include <optional>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
Include dependency graph for addrman_impl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  AddrInfo
 Extended statistics about a CAddress. More...
 
class  AddrManImpl
 
struct  AddrManImpl::NewTriedCount
 

Typedefs

using nid_type = int64_t
 User-defined type for the internally used nIds This used to be int, making it feasible for attackers to cause an overflow, see https://bitcoincore.org/en/2024/07/31/disclose-addrman-int-overflow/. More...
 

Variables

static constexpr int32_t ADDRMAN_TRIED_BUCKET_COUNT_LOG2 {8}
 Total number of buckets for tried addresses. More...
 
static constexpr int ADDRMAN_TRIED_BUCKET_COUNT {1 << ADDRMAN_TRIED_BUCKET_COUNT_LOG2}
 
static constexpr int32_t ADDRMAN_NEW_BUCKET_COUNT_LOG2 {10}
 Total number of buckets for new addresses. More...
 
static constexpr int ADDRMAN_NEW_BUCKET_COUNT {1 << ADDRMAN_NEW_BUCKET_COUNT_LOG2}
 
static constexpr int32_t ADDRMAN_BUCKET_SIZE_LOG2 {6}
 Maximum allowed number of entries in buckets for new and tried addresses. More...
 
static constexpr int ADDRMAN_BUCKET_SIZE {1 << ADDRMAN_BUCKET_SIZE_LOG2}
 

Typedef Documentation

◆ nid_type

using nid_type = int64_t

User-defined type for the internally used nIds This used to be int, making it feasible for attackers to cause an overflow, see https://bitcoincore.org/en/2024/07/31/disclose-addrman-int-overflow/.

Definition at line 40 of file addrman_impl.h.

Variable Documentation

◆ ADDRMAN_BUCKET_SIZE

constexpr int ADDRMAN_BUCKET_SIZE {1 << ADDRMAN_BUCKET_SIZE_LOG2}
staticconstexpr

Definition at line 33 of file addrman_impl.h.

◆ ADDRMAN_BUCKET_SIZE_LOG2

constexpr int32_t ADDRMAN_BUCKET_SIZE_LOG2 {6}
staticconstexpr

Maximum allowed number of entries in buckets for new and tried addresses.

Definition at line 32 of file addrman_impl.h.

◆ ADDRMAN_NEW_BUCKET_COUNT

constexpr int ADDRMAN_NEW_BUCKET_COUNT {1 << ADDRMAN_NEW_BUCKET_COUNT_LOG2}
staticconstexpr

Definition at line 30 of file addrman_impl.h.

◆ ADDRMAN_NEW_BUCKET_COUNT_LOG2

constexpr int32_t ADDRMAN_NEW_BUCKET_COUNT_LOG2 {10}
staticconstexpr

Total number of buckets for new addresses.

Definition at line 29 of file addrman_impl.h.

◆ ADDRMAN_TRIED_BUCKET_COUNT

constexpr int ADDRMAN_TRIED_BUCKET_COUNT {1 << ADDRMAN_TRIED_BUCKET_COUNT_LOG2}
staticconstexpr

Definition at line 27 of file addrman_impl.h.

◆ ADDRMAN_TRIED_BUCKET_COUNT_LOG2

constexpr int32_t ADDRMAN_TRIED_BUCKET_COUNT_LOG2 {8}
staticconstexpr

Total number of buckets for tried addresses.

Definition at line 26 of file addrman_impl.h.