Bitcoin Core  22.0.0
P2P Digital Currency
Functions
addrdb.cpp File Reference
#include <addrdb.h>
#include <addrman.h>
#include <chainparams.h>
#include <clientversion.h>
#include <cstdint>
#include <hash.h>
#include <logging/timer.h>
#include <netbase.h>
#include <random.h>
#include <streams.h>
#include <tinyformat.h>
#include <univalue.h>
#include <util/settings.h>
#include <util/system.h>
Include dependency graph for addrdb.cpp:

Go to the source code of this file.

Functions

void DumpAnchors (const fs::path &anchors_db_path, const std::vector< CAddress > &anchors)
 Dump the anchor IP address database (anchors.dat) More...
 
std::vector< CAddressReadAnchors (const fs::path &anchors_db_path)
 Read the anchor IP address database (anchors.dat) More...
 

Function Documentation

◆ DumpAnchors()

void DumpAnchors ( 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 256 of file addrdb.cpp.

Here is the caller graph for this function:

◆ ReadAnchors()

std::vector<CAddress> ReadAnchors ( 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 262 of file addrdb.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ BANMAN_JSON_ADDR_KEY

const char* BANMAN_JSON_ADDR_KEY = "address"
static

Definition at line 39 of file addrdb.cpp.