Skip to content
Snippets Groups Projects
Commit 3e5a3c3f authored by Adrien Béraud's avatar Adrien Béraud
Browse files

dht: getId renamed to getNodeId

parent 40f04882
No related branches found
No related tags found
No related merge requests found
...@@ -78,9 +78,9 @@ public: ...@@ -78,9 +78,9 @@ public:
virtual ~Dht(); virtual ~Dht();
/** /**
* Get the ID of the node, which was provided in the constructor. * Get the ID of the node.
*/ */
inline const InfoHash& getId() const { return myid; } inline const InfoHash& getNodeId() const { return myid; }
/** /**
* Get the current status of the node for the given family. * Get the current status of the node for the given family.
......
...@@ -150,10 +150,15 @@ public: ...@@ -150,10 +150,15 @@ public:
return dht_->getId(); return dht_->getId();
} }
InfoHash getRoutingId() const { InfoHash getNodeId() const {
if (!dht_) if (!dht_)
return {}; return {};
return dht_->getRoutingId(); return dht_->getNodeId();
}
//[[deprecated]]
InfoHash getRoutingId() const {
return getNodeId();
} }
std::vector<Dht::NodeExport> exportNodes() const { std::vector<Dht::NodeExport> exportNodes() const {
......
...@@ -61,10 +61,6 @@ public: ...@@ -61,10 +61,6 @@ public:
return key_->getPublicKey().getId(); return key_->getPublicKey().getId();
} }
InfoHash getRoutingId() const {
return Dht::getId();
}
ValueType secureType(ValueType&& type); ValueType secureType(ValueType&& type);
ValueType secureType(const ValueType& type) { ValueType secureType(const ValueType& type) {
......
...@@ -82,7 +82,7 @@ main(int argc, char **argv) ...@@ -82,7 +82,7 @@ main(int argc, char **argv)
i += 2; i += 2;
} }
std::cout << "OpenDht node " << dht.getRoutingId() << " running on port " << port<< std::endl; std::cout << "OpenDht node " << dht.getNodeId() << " running on port " << port<< std::endl;
std::cout << "Public key ID " << dht.getId() << std::endl; std::cout << "Public key ID " << dht.getId() << std::endl;
std::cout << " type 'c {hash}' to join a channel" << std::endl << std::endl; std::cout << " type 'c {hash}' to join a channel" << std::endl << std::endl;
......
...@@ -113,7 +113,7 @@ main(int argc, char **argv) ...@@ -113,7 +113,7 @@ main(int argc, char **argv)
i += 2; i += 2;
} }
std::cout << "OpenDht node " << dht.getRoutingId() << " running on port " << port<< std::endl; std::cout << "OpenDht node " << dht.getNodeId() << " running on port " << port<< std::endl;
std::cout << "Public key ID " << dht.getId() << std::endl; std::cout << "Public key ID " << dht.getId() << std::endl;
std::cout << " (type 'h' or 'help' for a list of possible commands)" << std::endl << std::endl; std::cout << " (type 'h' or 'help' for a list of possible commands)" << std::endl << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment