Ignore incorrectly-serialized banlist.dat entries

This commit is contained in:
Pieter Wuille
2020-10-12 15:35:08 -07:00
parent 883cea7dea
commit 886be97af5
3 changed files with 16 additions and 1 deletions

View File

@@ -184,7 +184,7 @@ void BanMan::SweepBanned()
while (it != m_banned.end()) {
CSubNet sub_net = (*it).first;
CBanEntry ban_entry = (*it).second;
if (now > ban_entry.nBanUntil) {
if (!sub_net.IsValid() || now > ban_entry.nBanUntil) {
m_banned.erase(it++);
m_is_dirty = true;
notify_ui = true;