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

dhtrunner: add getPublicKey()

parent 8aef63ce
No related branches found
No related tags found
No related merge requests found
...@@ -303,6 +303,7 @@ public: ...@@ -303,6 +303,7 @@ public:
* Get the public key fingerprint if an identity is used with this node, 0 otherwise. * Get the public key fingerprint if an identity is used with this node, 0 otherwise.
*/ */
InfoHash getId() const; InfoHash getId() const;
std::shared_ptr<crypto::PublicKey> getPublicKey() const;
/** /**
* Get the ID of the DHT node. * Get the ID of the DHT node.
......
...@@ -406,6 +406,14 @@ DhtRunner::getId() const ...@@ -406,6 +406,14 @@ DhtRunner::getId() const
return {}; return {};
} }
std::shared_ptr<crypto::PublicKey>
DhtRunner::getPublicKey() const
{
if (auto dht = activeDht())
return dht->getPublicKey();
return {};
}
InfoHash InfoHash
DhtRunner::getNodeId() const DhtRunner::getNodeId() const
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment