[asmap] Remove SanityCheckASMap() from netaddress

SanityCheckASMap(asmap, bits) simply calls through to SanityCheckASMap(asmap)
in util/asmap. Update all callers to simply call that function.
This commit is contained in:
John Newbery
2021-09-07 13:31:10 +01:00
parent 07a9eccb60
commit bfdf4ef334
6 changed files with 7 additions and 11 deletions

View File

@@ -9,6 +9,7 @@
#include <logging.h>
#include <netaddress.h>
#include <serialize.h>
#include <util/asmap.h>
#include <cmath>
#include <optional>
@@ -1028,7 +1029,7 @@ std::vector<bool> CAddrMan::DecodeAsmap(fs::path path)
bits.push_back((cur_byte >> bit) & 1);
}
}
if (!SanityCheckASMap(bits)) {
if (!SanityCheckASMap(bits, 128)) {
LogPrintf("Sanity check of asmap file %s failed\n", path);
return {};
}