Bitcoin ABC 0.26.3
P2P Digital Currency
|
#include <addrdb.h>
#include <addrman.h>
#include <chainparams.h>
#include <clientversion.h>
#include <common/args.h>
#include <hash.h>
#include <logging.h>
#include <logging/timer.h>
#include <random.h>
#include <streams.h>
#include <tinyformat.h>
#include <util/fs.h>
#include <util/fs_helpers.h>
#include <util/translation.h>
#include <cstdint>
Go to the source code of this file.
Functions | |
bool | DumpPeerAddresses (const CChainParams &chainParams, const ArgsManager &args, const AddrMan &addr) |
void | ReadFromStream (const CChainParams &chainParams, AddrMan &addr, CDataStream &ssPeers) |
Only used by tests. | |
util::Result< std::unique_ptr< AddrMan > > | LoadAddrman (const CChainParams &chainparams, const std::vector< bool > &asmap, const ArgsManager &args) |
Returns an error string on failure. | |
void | DumpAnchors (const CChainParams &chainParams, const fs::path &anchors_db_path, const std::vector< CAddress > &anchors) |
Dump the anchor IP address database (anchors.dat) | |
std::vector< CAddress > | ReadAnchors (const CChainParams &chainParams, const fs::path &anchors_db_path) |
Read the anchor IP address database (anchors.dat) | |
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 214 of file addrdb.cpp.
bool DumpPeerAddresses | ( | const CChainParams & | chainParams, |
const ArgsManager & | args, | ||
const AddrMan & | addr | ||
) |
Definition at line 151 of file addrdb.cpp.
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 164 of file addrdb.cpp.
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 224 of file addrdb.cpp.
void ReadFromStream | ( | const CChainParams & | chainParams, |
AddrMan & | addr, | ||
CDataStream & | ssPeers | ||
) |
Only used by tests.
Definition at line 158 of file addrdb.cpp.