mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Ignore banlist.dat
This also allows to remove the "dirty" argument, which can now be deduced from the return value of Read().
This commit is contained in:
@@ -197,16 +197,15 @@ bool CBanDB::Write(const banmap_t& banSet)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CBanDB::Read(banmap_t& banSet, bool& dirty)
|
||||
bool CBanDB::Read(banmap_t& banSet)
|
||||
{
|
||||
// If the JSON banlist does not exist, then try to read the non-upgraded banlist.dat.
|
||||
if (!fs::exists(m_banlist_json)) {
|
||||
// If this succeeds then we need to flush to disk in order to create the JSON banlist.
|
||||
dirty = true;
|
||||
return DeserializeFileDB(m_banlist_dat, banSet, CLIENT_VERSION);
|
||||
if (fs::exists(m_banlist_dat)) {
|
||||
LogPrintf("banlist.dat ignored because it can only be read by " PACKAGE_NAME " version 22.x. Remove %s to silence this warning.\n", m_banlist_dat);
|
||||
}
|
||||
// If the JSON banlist does not exist, then recreate it
|
||||
if (!fs::exists(m_banlist_json)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
dirty = false;
|
||||
|
||||
std::map<std::string, util::SettingsValue> settings;
|
||||
std::vector<std::string> errors;
|
||||
|
||||
Reference in New Issue
Block a user