refactor: Use span instead of vector for data in util/asmap

This prevents holding the asmap data in memory twice.

The version hash changes due to spans being serialized without their size-prefix (unlike vectors).
This commit is contained in:
Fabian Jahr
2025-04-23 00:13:32 +02:00
parent 385c34a052
commit cf4943fdcd
13 changed files with 87 additions and 51 deletions

View File

@@ -24,7 +24,7 @@
static constexpr size_t NUM_SOURCES = 64;
static constexpr size_t NUM_ADDRESSES_PER_SOURCE = 256;
static NetGroupManager EMPTY_NETGROUPMAN{{}};
static auto EMPTY_NETGROUPMAN{NetGroupManager::NoAsmap()};
static constexpr uint32_t ADDRMAN_CONSISTENCY_CHECK_RATIO{0};
static std::vector<CAddress> g_sources;