Remove worker thread parameter from Router constructors

pull/1312/head
Stephen Shelton 4 years ago
parent ec20d94c6b
commit 88c3e9ce00
No known key found for this signature in database
GPG Key ID: EE4BADACCE8B631C

@ -87,7 +87,6 @@ namespace llarp
/// to be created instead. Defaults to llarp::Router.
virtual std::unique_ptr<AbstractRouter>
makeRouter(
std::shared_ptr<llarp::thread::ThreadPool> worker,
llarp_ev_loop_ptr __netloop,
std::shared_ptr<Logic> logic);

@ -91,7 +91,7 @@ namespace llarp
crypto = std::make_unique<sodium::CryptoLibSodium>();
cryptoManager = std::make_unique<CryptoManager>(crypto.get());
router = makeRouter(worker, mainloop, logic);
router = makeRouter(mainloop, logic);
nodedb = std::make_unique<llarp_nodedb>(
nodedb_dir, [r = router.get()](auto call) { r->QueueDiskIO(std::move(call)); });
@ -108,11 +108,10 @@ namespace llarp
std::unique_ptr<AbstractRouter>
Context::makeRouter(
std::shared_ptr<llarp::thread::ThreadPool> worker,
llarp_ev_loop_ptr netloop,
std::shared_ptr<Logic> logic)
{
return std::make_unique<Router>(worker, netloop, logic);
return std::make_unique<Router>(netloop, logic);
}
int

@ -10,11 +10,10 @@ namespace tooling
std::unique_ptr<llarp::AbstractRouter>
HiveContext::makeRouter(
std::shared_ptr<llarp::thread::ThreadPool> worker,
llarp_ev_loop_ptr netloop,
std::shared_ptr<llarp::Logic> logic)
{
return std::make_unique<HiveRouter>(worker, netloop, logic, m_hive);
return std::make_unique<HiveRouter>(netloop, logic, m_hive);
}
HiveRouter*

@ -13,7 +13,6 @@ namespace tooling
std::unique_ptr<llarp::AbstractRouter>
makeRouter(
std::shared_ptr<llarp::thread::ThreadPool> worker,
llarp_ev_loop_ptr netloop,
std::shared_ptr<llarp::Logic> logic) override;

@ -5,7 +5,6 @@
namespace tooling
{
HiveRouter::HiveRouter(
std::shared_ptr<llarp::thread::ThreadPool> worker,
llarp_ev_loop_ptr netloop,
std::shared_ptr<llarp::Logic> logic,
RouterHive* hive)

@ -11,7 +11,6 @@ namespace tooling
struct HiveRouter : public llarp::Router
{
HiveRouter(
std::shared_ptr<llarp::thread::ThreadPool> worker,
llarp_ev_loop_ptr netloop,
std::shared_ptr<llarp::Logic> logic,
RouterHive* hive);

Loading…
Cancel
Save