6 #ifndef BITCOIN_ADDRDB_H 7 #define BITCOIN_ADDRDB_H 49 uint8_t ban_reason = 2;
50 READWRITE(obj.nVersion, obj.nCreateTime, obj.nBanUntil, ban_reason);
86 static constexpr
const char*
JSON_KEY =
"banned_nets";
91 explicit CBanDB(fs::path ban_list_path);
111 void DumpAnchors(
const fs::path& anchors_db_path,
const std::vector<CAddress>& anchors);
119 std::vector<CAddress>
ReadAnchors(
const fs::path& anchors_db_path);
121 #endif // BITCOIN_ADDRDB_H char const * json() noexcept
Template to generate JSON data.
Access to the (IP) address database (peers.dat)
CBanEntry(int64_t nCreateTimeIn)
Double ended buffer combining vector and stream-like interfaces.
bool Read(banmap_t &banSet, bool &dirty)
Read the banlist from disk.
Stochastical (IP) address manager.
Access to the banlist databases (banlist.json and banlist.dat)
bool Write(const CAddrMan &addr)
CBanDB(fs::path ban_list_path)
A CService with information about it as peer.
static constexpr const char * JSON_KEY
JSON key under which the data is stored in the json database.
bool Write(const banmap_t &banSet)
const fs::path m_banlist_dat
std::vector< CAddress > ReadAnchors(const fs::path &anchors_db_path)
Read the anchor IP address database (anchors.dat)
void DumpAnchors(const fs::path &anchors_db_path, const std::vector< CAddress > &anchors)
Dump the anchor IP address database (anchors.dat)
const fs::path m_banlist_json
SERIALIZE_METHODS(CBanEntry, obj)
std::map< CSubNet, CBanEntry > banmap_t
static const int CURRENT_VERSION
UniValue ToJson() const
Generate a JSON representation of this ban entry.
bool Read(CAddrMan &addr)