Add asmap sanity checker

This commit is contained in:
Pieter Wuille
2020-04-02 18:18:08 -07:00
parent 5feefbe6e7
commit fffd8dca2d
5 changed files with 70 additions and 0 deletions

View File

@@ -644,5 +644,9 @@ std::vector<bool> CAddrMan::DecodeAsmap(fs::path path)
bits.push_back((cur_byte >> bit) & 1);
}
}
if (!SanityCheckASMap(bits)) {
LogPrintf("Sanity check of asmap file %s failed\n", path);
return {};
}
return bits;
}