mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
Adding an option to choose storage engine
This commit is contained in:
parent
ef4e11f00a
commit
8a8ea9d5d4
3 changed files with 20 additions and 2 deletions
|
@ -37,7 +37,13 @@ namespace data
|
|||
|
||||
void NetDb::Start ()
|
||||
{
|
||||
m_Storage.reset(new FsIdentStorage("netDb", "r", "routerInfo-", "dat"));
|
||||
std::string engine;
|
||||
i2p::config::GetOption("storage.engine", engine);
|
||||
if (engine == "lmdb")
|
||||
m_Storage.reset(new MdbIdentStorage("netDb.lmdb"));
|
||||
else
|
||||
m_Storage.reset(new FsIdentStorage("netDb", "r", "routerInfo-", "dat"));
|
||||
|
||||
m_Storage->Init();
|
||||
InitProfilesStorage ();
|
||||
m_Families.LoadCertificates ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue