small bits of cleanup

This commit is contained in:
Thomas Winget 2023-11-28 20:46:43 -05:00
parent a209182016
commit f87c37fbb6
2 changed files with 2 additions and 21 deletions

View File

@ -449,26 +449,11 @@ namespace llarp
oxenc::bt_dict_consumer btdc{m.body()};
btdc.required("explicit_ids");
auto explicit_ids = btdc.consume_list<std::vector<std::string>>();
auto explicit_ids = btdc.consume_list<std::vector<ustring>>();
auto since_time = rc_time{std::chrono::seconds{btdc.require<int64_t>("since")}};
std::unordered_set<RouterID> explicit_relays;
// Initial fetch: give me all the RC's
if (explicit_ids.empty())
{
// TODO: this
}
if (explicit_ids.size() > (rcs.size() / 4))
{
log::info(
link_cat, "Remote requested too many relay IDs (greater than 1/4 of what we have).");
m.respond(RCFetchMessage::INVALID_REQUEST, true);
return;
}
for (auto& sv : explicit_ids)
{
if (sv.size() != RouterID::SIZE)
@ -477,7 +462,7 @@ namespace llarp
return;
}
explicit_relays.emplace(reinterpret_cast<const byte_t*>(sv.data()));
explicit_relays.emplace(sv.data());
}
oxenc::bt_dict_producer btdp;

View File

@ -1272,10 +1272,6 @@ namespace llarp
llarp::sys::service_manager->stopping();
log::debug(logcat, "stopping exit context");
_exit_context.Stop();
llarp::sys::service_manager->stopping();
log::debug(logcat, "final upstream pump");
llarp::sys::service_manager->stopping();
log::debug(logcat, "final links pump");
_loop->call_later(200ms, [this] { AfterStopIssued(); });
}