aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities/blockchain_export.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/blockchain_utilities/blockchain_export.cpp')
-rw-r--r--src/blockchain_utilities/blockchain_export.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/blockchain_utilities/blockchain_export.cpp b/src/blockchain_utilities/blockchain_export.cpp
index 6f67c61c3..ec885ea98 100644
--- a/src/blockchain_utilities/blockchain_export.cpp
+++ b/src/blockchain_utilities/blockchain_export.cpp
@@ -129,11 +129,14 @@ int main(int argc, char* argv[])
BlockchainDB* db = new BlockchainLMDB();
boost::filesystem::path folder(m_config_folder);
folder /= db->get_db_name();
- LOG_PRINT_L0("Loading blockchain from folder " << folder.string() << " ...");
+ int lmdb_flags = 0;
+ lmdb_flags |= MDB_RDONLY;
const std::string filename = folder.string();
+
+ LOG_PRINT_L0("Loading blockchain from folder " << filename << " ...");
try
{
- db->open(filename);
+ db->open(filename, lmdb_flags);
}
catch (const std::exception& e)
{