MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / CheckStandardAsmap

Function CheckStandardAsmap

src/util/asmap.cpp:308–315  ·  view source on GitHub ↗

* Provides a safe interface for validating ASMap data before use. * Returns true if the data is valid for 128 bits long inputs. */

Source from the content-addressed store, hash-verified

306 * Returns true if the data is valid for 128 bits long inputs.
307 */
308bool CheckStandardAsmap(const std::span<const std::byte> data)
309{
310 if (!SanityCheckAsmap(data, 128)) {
311 LogWarning("Sanity check of asmap data failed\n");
312 return false;
313 }
314 return true;
315}
316
317/**
318 * Loads an ASMap file from disk and validates it.

Callers 6

AppInitMainFunction · 0.85
FUZZ_TARGETFunction · 0.85
ConsumeNetGroupManagerFunction · 0.85
exportasmapFunction · 0.85
BenchGetMappedASFunction · 0.85
DecodeAsmapFunction · 0.85

Calls 1

SanityCheckAsmapFunction · 0.85

Tested by 2

FUZZ_TARGETFunction · 0.68
ConsumeNetGroupManagerFunction · 0.68