diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-02-02 21:34:31 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-02-02 21:34:31 +0200 |
commit | 3aa008e4c66039b2d0e72296fbb64458d62028ed (patch) | |
tree | 72eb8bdcec73b59eb7bf889f910e2c2d392d3d56 /src | |
parent | Merge pull request #1645 (diff) | |
parent | Update and use blockchain data files defines (diff) | |
download | monero-3aa008e4c66039b2d0e72296fbb64458d62028ed.tar.xz |
Merge pull request #1646
95f3e193 Update and use blockchain data files defines (Miguel Herranz)
Diffstat (limited to 'src')
-rw-r--r-- | src/blockchain_db/lmdb/db_lmdb.cpp | 9 | ||||
-rw-r--r-- | src/cryptonote_config.h | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp index 7d548afed..1cfcf3a9e 100644 --- a/src/blockchain_db/lmdb/db_lmdb.cpp +++ b/src/blockchain_db/lmdb/db_lmdb.cpp @@ -1056,10 +1056,11 @@ void BlockchainLMDB::open(const std::string& filename, const int mdb_flags) // check for existing LMDB files in base directory boost::filesystem::path old_files = direc.parent_path(); - if (boost::filesystem::exists(old_files / "data.mdb") || boost::filesystem::exists(old_files / "lock.mdb")) + if (boost::filesystem::exists(old_files / CRYPTONOTE_BLOCKCHAINDATA_FILENAME) + || boost::filesystem::exists(old_files / CRYPTONOTE_BLOCKCHAINDATA_LOCK_FILENAME)) { LOG_PRINT_L0("Found existing LMDB files in " << old_files.string()); - LOG_PRINT_L0("Move data.mdb and/or lock.mdb to " << filename << ", or delete them, and then restart"); + LOG_PRINT_L0("Move " << CRYPTONOTE_BLOCKCHAINDATA_FILENAME << " and/or " << CRYPTONOTE_BLOCKCHAINDATA_LOCK_FILENAME << " to " << filename << ", or delete them, and then restart"); throw DB_ERROR("Database could not be opened"); } @@ -1313,9 +1314,9 @@ std::vector<std::string> BlockchainLMDB::get_filenames() const std::vector<std::string> filenames; boost::filesystem::path datafile(m_folder); - datafile /= "data.mdb"; + datafile /= CRYPTONOTE_BLOCKCHAINDATA_FILENAME; boost::filesystem::path lockfile(m_folder); - lockfile /= "lock.mdb"; + lockfile /= CRYPTONOTE_BLOCKCHAINDATA_LOCK_FILENAME; filenames.push_back(datafile.string()); filenames.push_back(lockfile.string()); diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h index 95cbf74f0..97f2f2afc 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -120,8 +120,8 @@ #define CRYPTONOTE_NAME "bitmonero" #define CRYPTONOTE_POOLDATA_FILENAME "poolstate.bin" -#define CRYPTONOTE_BLOCKCHAINDATA_FILENAME "blockchain.bin" -#define CRYPTONOTE_BLOCKCHAINDATA_TEMP_FILENAME "blockchain.bin.tmp" +#define CRYPTONOTE_BLOCKCHAINDATA_FILENAME "data.mdb" +#define CRYPTONOTE_BLOCKCHAINDATA_LOCK_FILENAME "lock.mdb" #define P2P_NET_DATA_FILENAME "p2pstate.bin" #define MINER_CONFIG_FILE_NAME "miner_conf.json" |