5 #ifndef BITCOIN_BANMAN_H 6 #define BITCOIN_BANMAN_H 63 void Ban(
const CNetAddr &net_addr, int64_t ban_time_offset = 0,
64 bool since_unix_epoch =
false);
65 void Ban(
const CSubNet &sub_net, int64_t ban_time_offset = 0,
66 bool since_unix_epoch =
false);
101 #endif // BITCOIN_BANMAN_H void Ban(const CNetAddr &net_addr, int64_t ban_time_offset=0, bool since_unix_epoch=false)
void Discourage(const CNetAddr &net_addr)
void SetBanned(const banmap_t &banmap)
CClientUIInterface * m_client_interface
BanMan(fs::path ban_file, const CChainParams &chainparams, CClientUIInterface *client_interface, int64_t default_ban_time)
RollingBloomFilter is a probabilistic "keep track of most recently inserted" set. ...
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system...
void SetBannedSetDirty(bool dirty=true)
set the "dirty" flag for the banlist
Signals for UI communication.
Access to the banlist database (banlist.dat)
bool IsDiscouraged(const CNetAddr &net_addr)
Return whether net_addr is discouraged.
banmap_t m_banned GUARDED_BY(m_cs_banned)
void SweepBanned()
clean unused entries (if bantime has expired)
static constexpr std::chrono::minutes DUMP_BANS_INTERVAL
RecursiveMutex m_cs_banned
void GetBanned(banmap_t &banmap)
CRollingBloomFilter m_discouraged GUARDED_BY(m_cs_banned)
const int64_t m_default_ban_time
IP address (IPv6, or IPv4 using mapped IPv6 range (::FFFF:0:0/96))
static constexpr unsigned int DEFAULT_MISBEHAVING_BANTIME
bool Unban(const CNetAddr &net_addr)
std::map< CSubNet, CBanEntry > banmap_t
bool IsBanned(const CNetAddr &net_addr)
Return whether net_addr is banned.