You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lokinet/llarp/router/abstractrouter.cpp

16 lines
343 B
C++

#include <router/abstractrouter.hpp>
#include <nodedb.hpp>
namespace llarp
{
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