Changeset View
Changeset View
Standalone View
Standalone View
src/banman.cpp
Show All 11 Lines | |||||
#include <util/translation.h> | #include <util/translation.h> | ||||
BanMan::BanMan(fs::path ban_file, const CChainParams &chainparams, | BanMan::BanMan(fs::path ban_file, const CChainParams &chainparams, | ||||
CClientUIInterface *client_interface, int64_t default_ban_time) | CClientUIInterface *client_interface, int64_t default_ban_time) | ||||
: m_client_interface(client_interface), | : m_client_interface(client_interface), | ||||
m_ban_db(std::move(ban_file), chainparams), | m_ban_db(std::move(ban_file), chainparams), | ||||
m_default_ban_time(default_ban_time) { | m_default_ban_time(default_ban_time) { | ||||
if (m_client_interface) { | if (m_client_interface) { | ||||
m_client_interface->InitMessage(_("Loading banlist...")); | m_client_interface->InitMessage(_("Loading banlist...").translated); | ||||
} | } | ||||
int64_t n_start = GetTimeMillis(); | int64_t n_start = GetTimeMillis(); | ||||
m_is_dirty = false; | m_is_dirty = false; | ||||
banmap_t banmap; | banmap_t banmap; | ||||
if (m_ban_db.Read(banmap)) { | if (m_ban_db.Read(banmap)) { | ||||
// thread save setter | // thread save setter | ||||
SetBanned(banmap); | SetBanned(banmap); | ||||
▲ Show 20 Lines • Show All 215 Lines • Show Last 20 Lines |