Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Private Attributes | List of all members
CAddrDb Class Reference

#include <db.h>

Collaboration diagram for CAddrDb:
[legend]

Public Member Functions

void GetStats (CAddrDbStats &stats) const
 
void ResetIgnores ()
 
std::vector< CAddrReportGetAll ()
 
template<typename Stream >
void Serialize (Stream &s) const
 
template<typename Stream >
void Unserialize (Stream &s)
 
void Add (const CAddress &addr, bool fForce=false)
 
void Add (const std::vector< CAddress > &vAddr, bool fForce=false)
 
void GetMany (std::vector< CServiceResult > &ips, int max)
 
void ResultMany (const std::vector< CServiceResult > &ips)
 
void GetIPs (std::set< CNetAddr > &ips, uint64_t requestedFlags, uint32_t max, const bool *nets)
 

Public Attributes

std::map< CService, int64_tbanned
 

Protected Member Functions

void Add_ (const CAddress &addr, bool force)
 
bool Get_ (CServiceResult &ip)
 
void Good_ (const CService &ip, int clientV, std::string clientSV, int blocks, uint64_t services, bool checkpointVerified)
 
void Bad_ (const CService &ip, int ban)
 
int Lookup_ (const CService &ip)
 
void GetIPs_ (std::set< CNetAddr > &ips, uint64_t requestedFlags, uint32_t max, const bool *nets)
 

Private Attributes

RecursiveMutex cs
 
int nId
 
std::map< int, SeederAddrInfoidToInfo
 
std::map< CService, intipToId
 
std::deque< intourId
 
std::set< intunkId
 
std::set< intgoodId
 

Detailed Description

        seen nodes
       /          \

(a) banned nodes available nodes-----------— / | \ tracked nodes (b) unknown nodes (e) active nodes / \ (d) good nodes (c) non-good nodes

Definition at line 284 of file db.h.

Member Function Documentation

◆ Add() [1/2]

void CAddrDb::Add ( const CAddress addr,
bool  fForce = false 
)
inline

Definition at line 418 of file db.h.

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

◆ Add() [2/2]

void CAddrDb::Add ( const std::vector< CAddress > &  vAddr,
bool  fForce = false 
)
inline

Definition at line 423 of file db.h.

Here is the call graph for this function:

◆ Add_()

void CAddrDb::Add_ ( const CAddress addr,
bool  force 
)
protected

Definition at line 143 of file db.cpp.

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

◆ Bad_()

void CAddrDb::Bad_ ( const CService ip,
int  ban 
)
protected

info.IsReliable() &&

Definition at line 110 of file db.cpp.

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

◆ Get_()

bool CAddrDb::Get_ ( CServiceResult ip)
protected

Definition at line 44 of file db.cpp.

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

◆ GetAll()

std::vector< CAddrReport > CAddrDb::GetAll ( )
inline

Definition at line 343 of file db.h.

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

◆ GetIPs()

void CAddrDb::GetIPs ( std::set< CNetAddr > &  ips,
uint64_t  requestedFlags,
uint32_t  max,
const bool nets 
)
inline

Definition at line 455 of file db.h.

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

◆ GetIPs_()

void CAddrDb::GetIPs_ ( std::set< CNetAddr > &  ips,
uint64_t  requestedFlags,
uint32_t  max,
const bool nets 
)
protected

Definition at line 188 of file db.cpp.

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

◆ GetMany()

void CAddrDb::GetMany ( std::vector< CServiceResult > &  ips,
int  max 
)
inline

Definition at line 430 of file db.h.

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

◆ GetStats()

void CAddrDb::GetStats ( CAddrDbStats stats) const
inline

Definition at line 322 of file db.h.

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

◆ Good_()

void CAddrDb::Good_ ( const CService ip,
int  clientV,
std::string  clientSV,
int  blocks,
uint64_t  services,
bool  checkpointVerified 
)
protected

Definition at line 87 of file db.cpp.

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

◆ Lookup_()

int CAddrDb::Lookup_ ( const CService ip)
protected

Definition at line 80 of file db.cpp.

Here is the caller graph for this function:

◆ ResetIgnores()

void CAddrDb::ResetIgnores ( )
inline

Definition at line 336 of file db.h.

Here is the caller graph for this function:

◆ ResultMany()

void CAddrDb::ResultMany ( const std::vector< CServiceResult > &  ips)
inline

Definition at line 442 of file db.h.

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

◆ Serialize()

template<typename Stream >
void CAddrDb::Serialize ( Stream s) const
inline

Definition at line 365 of file db.h.

Here is the call graph for this function:

◆ Unserialize()

template<typename Stream >
void CAddrDb::Unserialize ( Stream s)
inline

Definition at line 387 of file db.h.

Here is the call graph for this function:

Member Data Documentation

◆ banned

std::map<CService, int64_t> CAddrDb::banned

Definition at line 320 of file db.h.

◆ cs

RecursiveMutex CAddrDb::cs
mutableprivate

Definition at line 286 of file db.h.

◆ goodId

std::set<int> CAddrDb::goodId
private

Definition at line 298 of file db.h.

◆ idToInfo

std::map<int, SeederAddrInfo> CAddrDb::idToInfo
private

Definition at line 290 of file db.h.

◆ ipToId

std::map<CService, int> CAddrDb::ipToId
private

Definition at line 292 of file db.h.

◆ nId

int CAddrDb::nId
private

Definition at line 288 of file db.h.

◆ ourId

std::deque<int> CAddrDb::ourId
private

Definition at line 294 of file db.h.

◆ unkId

std::set<int> CAddrDb::unkId
private

Definition at line 296 of file db.h.


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