lokinet/llarp/bootstrap-fallbacks.cpp.in
dr7ana 68e67c881b {Remote,Local}RC's
- RemoteRC supplants most of the functionality throughout the code of RouterContact
- Next step will be to sort out CI issues, then see if we can get rid of either LocalRC (and therefore RouterContact entirely)
2024-01-31 07:54:12 -08:00

27 lines
605 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;
for (const auto& [network, bootstrap] : std::initializer_list<std::pair<std::string, std::string_view>>{
@BOOTSTRAP_FALLBACKS@
})
{
if (network != RouterContact::ACTIVE_NETID)
continue;
auto& bsl = fallbacks[network];
bsl.bt_decode(bootstrap);
}
return fallbacks;
}
} // namespace llarp