mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-10-29 11:05:43 +00:00
20 lines
388 B
C++
20 lines
388 B
C++
#include <router/abstractrouter.hpp>
|
|
#include <nodedb.hpp>
|
|
|
|
namespace llarp
|
|
{
|
|
AbstractRouter::~AbstractRouter()
|
|
{
|
|
}
|
|
|
|
void
|
|
AbstractRouter::EnsureRouter(RouterID router, RouterLookupHandler handler)
|
|
{
|
|
std::vector< RouterContact > found(1);
|
|
if(nodedb()->Get(router, found[0]))
|
|
handler(found);
|
|
else
|
|
LookupRouter(router, handler);
|
|
}
|
|
} // namespace llarp
|