Bitcoin Core  22.99.0
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
CAddrManDeterministic Class Reference
Inheritance diagram for CAddrManDeterministic:
[legend]
Collaboration diagram for CAddrManDeterministic:
[legend]

Public Member Functions

 CAddrManDeterministic (std::vector< bool > asmap, FuzzedDataProvider &fuzzed_data_provider)
 
CNetAddr RandAddr () EXCLUSIVE_LOCKS_REQUIRED(cs)
 Generate a random address. More...
 
void Fill ()
 Fill this addrman with lots of addresses from lots of sources. More...
 
bool operator== (const CAddrManDeterministic &other)
 Compare with another AddrMan. More...
 
- Public Member Functions inherited from CAddrMan
template<typename Stream >
void Serialize (Stream &s_) const EXCLUSIVE_LOCKS_REQUIRED(!cs)
 
template<typename Stream >
void Unserialize (Stream &s_) EXCLUSIVE_LOCKS_REQUIRED(!cs)
 
 CAddrMan (std::vector< bool > asmap, bool deterministic, int32_t consistency_check_ratio)
 
 ~CAddrMan ()
 
size_t size () const EXCLUSIVE_LOCKS_REQUIRED(!cs)
 Return the number of (unique) addresses in all tables. More...
 
bool Add (const std::vector< CAddress > &vAddr, const CNetAddr &source, int64_t nTimePenalty=0) EXCLUSIVE_LOCKS_REQUIRED(!cs)
 Add addresses to addrman's new table. More...
 
void Good (const CService &addr, int64_t nTime=GetAdjustedTime()) EXCLUSIVE_LOCKS_REQUIRED(!cs)
 Mark an entry as accessible. More...
 
void Attempt (const CService &addr, bool fCountFailure, int64_t nTime=GetAdjustedTime()) EXCLUSIVE_LOCKS_REQUIRED(!cs)
 Mark an entry as connection attempted to. More...
 
void ResolveCollisions () EXCLUSIVE_LOCKS_REQUIRED(!cs)
 See if any to-be-evicted tried table entries have been tested and if so resolve the collisions. More...
 
CAddrInfo SelectTriedCollision () EXCLUSIVE_LOCKS_REQUIRED(!cs)
 Randomly select an address in tried that another address is attempting to evict. More...
 
CAddrInfo Select (bool newOnly=false) const EXCLUSIVE_LOCKS_REQUIRED(!cs)
 Choose an address to connect to. More...
 
std::vector< CAddressGetAddr (size_t max_addresses, size_t max_pct, std::optional< Network > network) const EXCLUSIVE_LOCKS_REQUIRED(!cs)
 Return all or many randomly selected addresses, optionally by network. More...
 
void Connected (const CService &addr, int64_t nTime=GetAdjustedTime()) EXCLUSIVE_LOCKS_REQUIRED(!cs)
 Outer function for Connected_() More...
 
void SetServices (const CService &addr, ServiceFlags nServices) EXCLUSIVE_LOCKS_REQUIRED(!cs)
 
const std::vector< bool > & GetAsmap () const
 

Public Attributes

FuzzedDataProviderm_fuzzed_data_provider
 

Detailed Description

Definition at line 37 of file addrman.cpp.

Constructor & Destructor Documentation

◆ CAddrManDeterministic()

CAddrManDeterministic::CAddrManDeterministic ( std::vector< bool >  asmap,
FuzzedDataProvider fuzzed_data_provider 
)
inlineexplicit

Definition at line 42 of file addrman.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ Fill()

void CAddrManDeterministic::Fill ( )
inline

Fill this addrman with lots of addresses from lots of sources.

Definition at line 90 of file addrman.cpp.

Here is the call graph for this function:

◆ operator==()

bool CAddrManDeterministic::operator== ( const CAddrManDeterministic other)
inline

Compare with another AddrMan.

This compares:

  • the values in mapInfo (the keys aka ids are ignored)
  • vvNew entries refer to the same addresses
  • vvTried entries refer to the same addresses

Definition at line 132 of file addrman.cpp.

Here is the call graph for this function:

◆ RandAddr()

CNetAddr CAddrManDeterministic::RandAddr ( )
inline

Generate a random address.

Always returns a valid address.

Definition at line 52 of file addrman.cpp.

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

Member Data Documentation

◆ m_fuzzed_data_provider

FuzzedDataProvider& CAddrManDeterministic::m_fuzzed_data_provider

Definition at line 40 of file addrman.cpp.


The documentation for this class was generated from the following file: