mirror of
https://github.com/monero-project/monero.git
synced 2026-01-05 01:07:21 -08:00
BlockchainDB implementations have names now
In order to make things more general, BlockchainDB now has get_db_name() which should return a string with the "name" of that type of db. This "name" will be the subfolder name that holds that db type's files within the monero folder. Small bugfix: blockchain_converter was not correctly appending this in the prior hard-coded-string implementation of the subfolder data directory concept.
This commit is contained in:
@@ -231,17 +231,18 @@ bool Blockchain::init(const std::string& config_folder, bool testnet)
|
||||
LOG_PRINT_L3("Blockchain::" << __func__);
|
||||
CRITICAL_REGION_LOCAL(m_blockchain_lock);
|
||||
|
||||
// TODO: make this configurable
|
||||
m_db = new BlockchainLMDB();
|
||||
|
||||
m_config_folder = config_folder;
|
||||
m_testnet = testnet;
|
||||
|
||||
boost::filesystem::path folder(m_config_folder);
|
||||
folder /= "lmdb";
|
||||
|
||||
folder /= m_db->get_db_name();
|
||||
|
||||
LOG_PRINT_L0("Loading blockchain from folder " << folder.c_str() << " ...");
|
||||
|
||||
//FIXME: update filename for BlockchainDB
|
||||
const std::string filename = folder.string();
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user