Bitcoin Core 28.99.0
P2P Digital Currency
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
CBanDB Class Reference

Access to the banlist database (banlist.json) More...

#include <addrdb.h>

Collaboration diagram for CBanDB:
[legend]

Public Member Functions

 CBanDB (fs::path ban_list_path)
 
bool Write (const banmap_t &banSet)
 
bool Read (banmap_t &banSet)
 Read the banlist from disk. More...
 

Private Attributes

const fs::path m_banlist_dat
 
const fs::path m_banlist_json
 

Static Private Attributes

static constexpr const char * JSON_KEY = "banned_nets"
 JSON key under which the data is stored in the json database. More...
 

Detailed Description

Access to the banlist database (banlist.json)

Definition at line 28 of file addrdb.h.

Constructor & Destructor Documentation

◆ CBanDB()

CBanDB::CBanDB ( fs::path  ban_list_path)
explicit

Definition at line 131 of file addrdb.cpp.

Member Function Documentation

◆ Read()

bool CBanDB::Read ( banmap_t banSet)

Read the banlist from disk.

Parameters
[out]banSetThe loaded list. Set if true is returned, otherwise it is left in an undefined state.
Returns
true on success

Definition at line 150 of file addrdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Write()

bool CBanDB::Write ( const banmap_t banSet)

Definition at line 137 of file addrdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ JSON_KEY

constexpr const char* CBanDB::JSON_KEY = "banned_nets"
staticconstexprprivate

JSON key under which the data is stored in the json database.

Definition at line 34 of file addrdb.h.

◆ m_banlist_dat

const fs::path CBanDB::m_banlist_dat
private

Definition at line 36 of file addrdb.h.

◆ m_banlist_json

const fs::path CBanDB::m_banlist_json
private

Definition at line 37 of file addrdb.h.


The documentation for this class was generated from the following files: