mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
[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:
@@ -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 {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user