Commit 40cae3db authored by Adrien Béraud's avatar Adrien Béraud
Browse files

namedirectory: use dht executor

Change-Id: I232a001d3e62b7470e38adc1aa74eabadcc8b210
parent 827c546d
This diff is collapsed.
...@@ -23,8 +23,10 @@ ...@@ -23,8 +23,10 @@
#include <map> #include <map>
#include <string> #include <string>
#include <mutex> #include <mutex>
#include <memory>
namespace dht { namespace dht {
class Executor;
namespace crypto { namespace crypto {
struct PublicKey; struct PublicKey;
} }
...@@ -78,6 +80,8 @@ private: ...@@ -78,6 +80,8 @@ private:
std::map<std::string, std::string> nameCache_ {}; std::map<std::string, std::string> nameCache_ {};
std::map<std::string, std::string> addrCache_ {}; std::map<std::string, std::string> addrCache_ {};
std::shared_ptr<dht::Executor> executor_;
std::string nameCache(const std::string& addr) { std::string nameCache(const std::string& addr) {
std::lock_guard<std::mutex> l(lock_); std::lock_guard<std::mutex> l(lock_);
auto cacheRes = nameCache_.find(addr); auto cacheRes = nameCache_.find(addr);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment