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