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/netaddress.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/netaddress.cpp')
| -rw-r--r-- | src/netaddress.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/netaddress.cpp b/src/netaddress.cpp index 228caf74a..e0b27b1d7 100644 --- a/src/netaddress.cpp +++ b/src/netaddress.cpp @@ -894,3 +894,8 @@ bool operator<(const CSubNet& a, const CSubNet& b) { return (a.network < b.network || (a.network == b.network && memcmp(a.netmask, b.netmask, 16) < 0)); } + +bool SanityCheckASMap(const std::vector<bool>& asmap) +{ + return SanityCheckASMap(asmap, 128); // For IP address lookups, the input is 128 bits +} |