6#ifndef BITCOIN_ADDRDB_H
7#define BITCOIN_ADDRDB_H
34 static constexpr const char*
JSON_KEY =
"banned_nets";
bool DumpPeerAddresses(const ArgsManager &args, const AddrMan &addr)
std::vector< CAddress > ReadAnchors(const fs::path &anchors_db_path)
Read the anchor IP address database (anchors.dat)
util::Result< std::unique_ptr< AddrMan > > LoadAddrman(const NetGroupManager &netgroupman, const ArgsManager &args)
Returns an error string on failure.
void ReadFromStream(AddrMan &addr, DataStream &ssPeers)
Only used by tests.
void DumpAnchors(const fs::path &anchors_db_path, const std::vector< CAddress > &anchors)
Dump the anchor IP address database (anchors.dat)
Stochastic address manager.
A CService with information about it as peer.
Access to the banlist database (banlist.json)
bool Write(const banmap_t &banSet)
const fs::path m_banlist_dat
bool Read(banmap_t &banSet)
Read the banlist from disk.
static constexpr const char * JSON_KEY
JSON key under which the data is stored in the json database.
const fs::path m_banlist_json
CBanDB(fs::path ban_list_path)
Double ended buffer combining vector and stream-like interfaces.
Path class wrapper to block calls to the fs::path(std::string) implicit constructor and the fs::path:...
std::map< CSubNet, CBanEntry > banmap_t