aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2020-04-02 18:18:08 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2020-04-08 16:26:06 -0700
commitfffd8dca2de39ad4a683f0dce57cdca55ed2f600 (patch)
treee86de83adca4ce10b1a46c8f25aa8d4f2bc8f522 /src/addrman.cpp
parent5feefbe6e7b6cdd809eba4074d41dc95a7035f7e (diff)
downloadbitcoin-fffd8dca2de39ad4a683f0dce57cdca55ed2f600.tar.xz
Add asmap sanity checker
Diffstat (limited to 'src/addrman.cpp')
-rw-r--r--src/addrman.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/addrman.cpp b/src/addrman.cpp
index 2f8a3a0bd5..b22ad6d641 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -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;
}