Bitcoin ABC 0.32.6
P2P Digital Currency
Classes | Functions
addrdb.h File Reference
#include <net_types.h>
#include <serialize.h>
#include <univalue.h>
#include <util/fs.h>
#include <util/result.h>
#include <memory>
#include <string>
#include <vector>
Include dependency graph for addrdb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CBanEntry
 
class  CBanDB
 Access to the banlist databases (banlist.json and banlist.dat) More...
 

Functions

void ReadFromStream (const CChainParams &chainParams, AddrMan &addr, DataStream &ssPeers)
 Only used by tests. More...
 
bool DumpPeerAddresses (const CChainParams &chainParams, const ArgsManager &args, const AddrMan &addr)
 
util::Result< std::unique_ptr< AddrMan > > LoadAddrman (const CChainParams &chainparams, const std::vector< bool > &asmap, const ArgsManager &args)
 Returns an error string on failure. More...
 
void DumpAnchors (const CChainParams &chainParams, const fs::path &anchors_db_path, const std::vector< CAddress > &anchors)
 Dump the anchor IP address database (anchors.dat) More...
 
std::vector< CAddressReadAnchors (const CChainParams &chainParams, const fs::path &anchors_db_path)
 Read the anchor IP address database (anchors.dat) More...
 

Function Documentation

◆ DumpAnchors()

void DumpAnchors ( const CChainParams chainParams,
const fs::path anchors_db_path,
const std::vector< CAddress > &  anchors 
)

Dump the anchor IP address database (anchors.dat)

Anchors are last known outgoing block-relay-only peers that are tried to re-connect to on startup.

Definition at line 324 of file addrdb.cpp.

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

◆ DumpPeerAddresses()

bool DumpPeerAddresses ( const CChainParams chainParams,
const ArgsManager args,
const AddrMan addr 
)

Definition at line 259 of file addrdb.cpp.

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

◆ LoadAddrman()

util::Result< std::unique_ptr< AddrMan > > LoadAddrman ( const CChainParams chainparams,
const std::vector< bool > &  asmap,
const ArgsManager args 
)

Returns an error string on failure.

Definition at line 271 of file addrdb.cpp.

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

◆ ReadAnchors()

std::vector< CAddress > ReadAnchors ( const CChainParams chainParams,
const fs::path anchors_db_path 
)

Read the anchor IP address database (anchors.dat)

Deleting anchors.dat is intentional as it avoids renewed peering to anchors after an unclean shutdown and thus potential exploitation of the anchor peer policy.

Definition at line 334 of file addrdb.cpp.

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

◆ ReadFromStream()

void ReadFromStream ( const CChainParams chainParams,
AddrMan addr,
DataStream ssPeers 
)

Only used by tests.

Definition at line 265 of file addrdb.cpp.