diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-04-25 05:29:43 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-08-18 23:25:46 +0200 |
commit | 96469ee44afb7a31157d1653c172fc11f47d675c (patch) | |
tree | 0c77ff084882ffa689d67e5eaa175997d7b0d1e7 /src/Database.cpp | |
parent | c985ca6ccdf2ad6f21e3fbbada76030ddccb0fa0 (diff) |
Store opendht identity in storage file (cached)
Diffstat (limited to 'src/Database.cpp')
-rw-r--r-- | src/Database.cpp | 4 |
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 = */"", |