mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-17 15:25:35 +00:00
f574cd798f
- includes are now sorted in consistent, logical order; first step in an attempt to fix the tomfoolery (no relation to Tom) brought in by include-what-you-use - shuffled around some cmake linking to simplify dependency graph - superfluous files removed
26 lines
659 B
C++
26 lines
659 B
C++
#include <initializer_list>
|
|
#include <llarp/bootstrap.hpp>
|
|
|
|
namespace llarp
|
|
{
|
|
using namespace std::literals;
|
|
|
|
std::unordered_map<std::string, BootstrapList>
|
|
load_bootstrap_fallbacks()
|
|
{
|
|
std::unordered_map<std::string, BootstrapList> fallbacks;
|
|
using init_list = std::initializer_list<std::pair<std::string, std::string_view>>;
|
|
// clang-format off
|
|
for (const auto& [network, bootstrap] : init_list{
|
|
@BOOTSTRAP_FALLBACKS@
|
|
})
|
|
// clang-format on
|
|
{
|
|
llarp_buffer_t buf{bootstrap.data(), bootstrap.size()};
|
|
auto& bsl = fallbacks[network];
|
|
bsl.BDecode(&buf);
|
|
}
|
|
return fallbacks;
|
|
}
|
|
} // namespace llarp
|