aboutsummaryrefslogtreecommitdiff
path: root/src/addrdb.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-07-28 20:00:23 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-07-30 11:21:51 +0200
commitfa384fdd0b7af73d81fa9619c5fba779452cd2af (patch)
tree916e3054782a7188df547399f4efe191dca415d1 /src/addrdb.cpp
parent4b1fb50def0dea0cd320bc43c12d9a12edde0390 (diff)
downloadbitcoin-fa384fdd0b7af73d81fa9619c5fba779452cd2af.tar.xz
Ignore banlist.dat
This also allows to remove the "dirty" argument, which can now be deduced from the return value of Read().
Diffstat (limited to 'src/addrdb.cpp')
-rw-r--r--src/addrdb.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/addrdb.cpp b/src/addrdb.cpp
index b8fd019bab..c3e224ee83 100644
--- a/src/addrdb.cpp
+++ b/src/addrdb.cpp
@@ -197,17 +197,16 @@ 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_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)) {
- // 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);
+ return false;
}
- dirty = false;
-
std::map<std::string, util::SettingsValue> settings;
std::vector<std::string> errors;