diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2020-04-02 18:18:08 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2020-04-08 16:26:06 -0700 |
commit | fffd8dca2de39ad4a683f0dce57cdca55ed2f600 (patch) | |
tree | e86de83adca4ce10b1a46c8f25aa8d4f2bc8f522 /src/addrman.cpp | |
parent | 5feefbe6e7b6cdd809eba4074d41dc95a7035f7e (diff) |
Add asmap sanity checker
Diffstat (limited to 'src/addrman.cpp')
-rw-r--r-- | src/addrman.cpp | 4 |
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; } |