aboutsummaryrefslogtreecommitdiff
path: root/src/Database.cpp
diff options
context:
space:
mode:
authordec05eba <0xdec05eba@gmail.com>2018-04-25 05:29:43 +0200
committerdec05eba <0xdec05eba@gmail.com>2018-04-25 05:29:49 +0200
commitd71fe129b83f34b46136070fcf9a64865203be14 (patch)
treebd5d6bb47274f4a1e6e89a29f06498689e470505 /src/Database.cpp
parent13718f15767db6774dbf562b6798838ad9058984 (diff)
Store opendht identity in storage file (cached)
Diffstat (limited to 'src/Database.cpp')
-rw-r--r--src/Database.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Database.cpp b/src/Database.cpp
index 226aa05..383cc18 100644
--- a/src/Database.cpp
+++ b/src/Database.cpp
@@ -89,8 +89,6 @@ namespace odhtdb
onAddUserCallbackFunc(nullptr),
databaseStorage(storageDir)
{
- // TODO: Cache this in storage. It takes pretty long time to generate new identity
- auto identity = dht::crypto::generateIdentity();
node.run(port , {
/*.dht_config = */{
/*.node_config = */{
@@ -99,7 +97,7 @@ namespace odhtdb
/*.is_bootstrap = */false,
/*.maintain_storage*/false
},
- /*.id = */identity
+ /*.id = */databaseStorage.getIdentity()
},
/*.threaded = */true,
/*.proxy_server = */"",