Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
AddrManDeterministic Class Reference

#include <net.h>

Inheritance diagram for AddrManDeterministic:
[legend]
Collaboration diagram for AddrManDeterministic:
[legend]

Public Member Functions

 AddrManDeterministic (const NetGroupManager &netgroupman, FuzzedDataProvider &fuzzed_data_provider, int32_t check_ratio)
bool operator== (const AddrManDeterministic &other) const
 Compare with another AddrMan.
Public Member Functions inherited from AddrMan
 AddrMan (const NetGroupManager &netgroupman, bool deterministic, int32_t consistency_check_ratio)
 ~AddrMan ()
template<typename Stream>
void Serialize (Stream &s_) const
template<typename Stream>
void Unserialize (Stream &s_)
size_t Size (std::optional< Network > net=std::nullopt, std::optional< bool > in_new=std::nullopt) const
 Return size information about addrman.
bool Add (const std::vector< CAddress > &vAddr, const CNetAddr &source, std::chrono::seconds time_penalty=0s)
 Attempt to add one or more addresses to addrman's new table.
bool Good (const CService &addr, NodeSeconds time=Now< NodeSeconds >())
 Mark an address record as accessible and attempt to move it to addrman's tried table.
void Attempt (const CService &addr, bool fCountFailure, NodeSeconds time=Now< NodeSeconds >())
 Mark an entry as connection attempted to.
void ResolveCollisions ()
 See if any to-be-evicted tried table entries have been tested and if so resolve the collisions.
std::pair< CAddress, NodeSecondsSelectTriedCollision ()
 Randomly select an address in the tried table that another address is attempting to evict.
std::pair< CAddress, NodeSecondsSelect (bool new_only=false, const std::unordered_set< Network > &networks={}) const
 Choose an address to connect to.
std::vector< CAddressGetAddr (size_t max_addresses, size_t max_pct, std::optional< Network > network, bool filtered=true) const
 Return all or many randomly selected addresses, optionally by network.
std::vector< std::pair< AddrInfo, AddressPosition > > GetEntries (bool from_tried) const
 Returns an information-location pair for all addresses in the selected addrman table.
void Connected (const CService &addr, NodeSeconds time=Now< NodeSeconds >())
 We have successfully connected to this peer.
void SetServices (const CService &addr, ServiceFlags nServices)
 Update an entry's service bits.
std::optional< AddressPositionFindAddressEntry (const CAddress &addr)
 Test-only function Find the address record in AddrMan and return information about its position.

Additional Inherited Members

Protected Attributes inherited from AddrMan
const std::unique_ptr< AddrManImplm_impl

Detailed Description

Definition at line 41 of file net.h.

Constructor & Destructor Documentation

◆ AddrManDeterministic()

AddrManDeterministic::AddrManDeterministic ( const NetGroupManager & netgroupman,
FuzzedDataProvider & fuzzed_data_provider,
int32_t check_ratio )
inlineexplicit

Definition at line 44 of file net.h.

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

Member Function Documentation

◆ operator==()

bool AddrManDeterministic::operator== ( const AddrManDeterministic & other) const
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 57 of file net.h.

Here is the call graph for this function:

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