2021-03-09 22:24:35 +00:00
|
|
|
#pragma once
|
2019-12-06 17:32:46 +00:00
|
|
|
|
2021-03-09 22:24:35 +00:00
|
|
|
#include "router_contact.hpp"
|
2019-12-06 17:32:46 +00:00
|
|
|
#include <set>
|
2022-10-04 19:19:42 +00:00
|
|
|
#include <unordered_map>
|
2022-09-27 17:00:27 +00:00
|
|
|
#include "llarp/util/fs.hpp"
|
2019-12-06 17:32:46 +00:00
|
|
|
|
|
|
|
namespace llarp
|
|
|
|
{
|
2020-04-07 18:38:56 +00:00
|
|
|
struct BootstrapList final : public std::set<RouterContact>
|
2019-12-06 17:32:46 +00:00
|
|
|
{
|
|
|
|
bool
|
|
|
|
BDecode(llarp_buffer_t* buf);
|
|
|
|
|
|
|
|
bool
|
|
|
|
BEncode(llarp_buffer_t* buf) const;
|
|
|
|
|
2022-09-27 17:00:27 +00:00
|
|
|
void
|
|
|
|
AddFromFile(fs::path fpath);
|
|
|
|
|
2019-12-06 17:32:46 +00:00
|
|
|
void
|
|
|
|
Clear();
|
|
|
|
};
|
2022-10-04 19:19:42 +00:00
|
|
|
|
|
|
|
std::unordered_map<std::string, BootstrapList>
|
|
|
|
load_bootstrap_fallbacks();
|
|
|
|
|
2019-12-06 17:32:46 +00:00
|
|
|
} // namespace llarp
|