Calculate program file directories:

* Determine location of database files in Config
* Inject database directory or file path in PeerFinder and Validators
* PeerFinder and Validators will share the same sqlite file
This commit is contained in:
Nik Bougalis
2014-02-28 09:19:37 -08:00
committed by Vinnie Falco
parent e055dc1513
commit 28c7827f14
9 changed files with 84 additions and 32 deletions

View File

@@ -288,7 +288,9 @@ public:
, m_txQueue (TxQueue::New ())
, m_validators (add (Validators::Manager::New (
*this, LogPartition::getJournal <ValidatorsLog> ())))
*this,
getConfig ().getModuleDatabasePath (),
LogPartition::getJournal <ValidatorsLog> ())))
, mFeatures (IFeatures::New (2 * 7 * 24 * 60 * 60, 200)) // two weeks, 200/256
@@ -685,8 +687,8 @@ public:
//
// if (!getConfig ().RUN_STANDALONE)
m_peers.reset (add (Peers::New (m_mainIoPool, *m_resourceManager,
*m_siteFiles, *m_resolver, m_mainIoPool,
m_peerSSLContext->get ())));
*m_siteFiles, getConfig ().getModuleDatabasePath (),
*m_resolver, m_mainIoPool, m_peerSSLContext->get ())));
// SSL context used for WebSocket connections.
if (getConfig ().WEBSOCKET_SECURE)