Bitcoin Core  27.99.0
P2P Digital Currency
Functions | Variables
addrman.cpp File Reference
#include <addrman.h>
#include <bench/bench.h>
#include <netbase.h>
#include <netgroup.h>
#include <random.h>
#include <util/check.h>
#include <util/time.h>
#include <optional>
#include <vector>
Include dependency graph for addrman.cpp:

Go to the source code of this file.

Functions

static void CreateAddresses ()
 
static void AddAddressesToAddrMan (AddrMan &addrman)
 
static void FillAddrMan (AddrMan &addrman)
 
static void AddrManAdd (benchmark::Bench &bench)
 
static void AddrManSelect (benchmark::Bench &bench)
 
static void AddrManSelectFromAlmostEmpty (benchmark::Bench &bench)
 
static void AddrManSelectByNetwork (benchmark::Bench &bench)
 
static void AddrManGetAddr (benchmark::Bench &bench)
 
static void AddrManAddThenGood (benchmark::Bench &bench)
 
 BENCHMARK (AddrManAdd, benchmark::PriorityLevel::HIGH)
 
 BENCHMARK (AddrManSelect, benchmark::PriorityLevel::HIGH)
 
 BENCHMARK (AddrManSelectFromAlmostEmpty, benchmark::PriorityLevel::HIGH)
 
 BENCHMARK (AddrManSelectByNetwork, benchmark::PriorityLevel::HIGH)
 
 BENCHMARK (AddrManGetAddr, benchmark::PriorityLevel::HIGH)
 
 BENCHMARK (AddrManAddThenGood, benchmark::PriorityLevel::HIGH)
 

Variables

static constexpr size_t NUM_SOURCES = 64
 
static constexpr size_t NUM_ADDRESSES_PER_SOURCE = 256
 
static NetGroupManager EMPTY_NETGROUPMAN {std::vector<bool>()}
 
static constexpr uint32_t ADDRMAN_CONSISTENCY_CHECK_RATIO {0}
 
static std::vector< CAddressg_sources
 
static std::vector< std::vector< CAddress > > g_addresses
 

Function Documentation

◆ AddAddressesToAddrMan()

static void AddAddressesToAddrMan ( AddrMan addrman)
static

Definition at line 61 of file addrman.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddrManAdd()

static void AddrManAdd ( benchmark::Bench bench)
static

Definition at line 77 of file addrman.cpp.

Here is the call graph for this function:

◆ AddrManAddThenGood()

static void AddrManAddThenGood ( benchmark::Bench bench)
static

Definition at line 146 of file addrman.cpp.

Here is the call graph for this function:

◆ AddrManGetAddr()

static void AddrManGetAddr ( benchmark::Bench bench)
static

Definition at line 134 of file addrman.cpp.

Here is the call graph for this function:

◆ AddrManSelect()

static void AddrManSelect ( benchmark::Bench bench)
static

Definition at line 87 of file addrman.cpp.

Here is the call graph for this function:

◆ AddrManSelectByNetwork()

static void AddrManSelectByNetwork ( benchmark::Bench bench)
static

Definition at line 115 of file addrman.cpp.

Here is the call graph for this function:

◆ AddrManSelectFromAlmostEmpty()

static void AddrManSelectFromAlmostEmpty ( benchmark::Bench bench)
static

Definition at line 102 of file addrman.cpp.

Here is the call graph for this function:

◆ BENCHMARK() [1/6]

◆ BENCHMARK() [2/6]

◆ BENCHMARK() [3/6]

◆ BENCHMARK() [4/6]

◆ BENCHMARK() [5/6]

◆ BENCHMARK() [6/6]

◆ CreateAddresses()

static void CreateAddresses ( )
static

Definition at line 27 of file addrman.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FillAddrMan()

static void FillAddrMan ( AddrMan addrman)
static

Definition at line 68 of file addrman.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ADDRMAN_CONSISTENCY_CHECK_RATIO

constexpr uint32_t ADDRMAN_CONSISTENCY_CHECK_RATIO {0}
staticconstexpr

Definition at line 22 of file addrman.cpp.

◆ EMPTY_NETGROUPMAN

NetGroupManager EMPTY_NETGROUPMAN {std::vector<bool>()}
static

Definition at line 21 of file addrman.cpp.

◆ g_addresses

std::vector<std::vector<CAddress> > g_addresses
static

Definition at line 25 of file addrman.cpp.

◆ g_sources

std::vector<CAddress> g_sources
static

Definition at line 24 of file addrman.cpp.

◆ NUM_ADDRESSES_PER_SOURCE

constexpr size_t NUM_ADDRESSES_PER_SOURCE = 256
staticconstexpr

Definition at line 19 of file addrman.cpp.

◆ NUM_SOURCES

constexpr size_t NUM_SOURCES = 64
staticconstexpr

Definition at line 18 of file addrman.cpp.