diff options
| author | Pieter Wuille <[email protected]> | 2020-04-02 18:18:08 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2020-04-08 16:26:06 -0700 |
| commit | fffd8dca2de39ad4a683f0dce57cdca55ed2f600 (patch) | |
| tree | e86de83adca4ce10b1a46c8f25aa8d4f2bc8f522 /src/addrman.cpp | |
| parent | Improve asmap Interpret checks and document failures (diff) | |
| download | discoin-fffd8dca2de39ad4a683f0dce57cdca55ed2f600.tar.xz discoin-fffd8dca2de39ad4a683f0dce57cdca55ed2f600.zip | |
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 2f8a3a0bd..b22ad6d64 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; } |