From 14c0217b030bb2f260da5a85af1efc546a64c74b Mon Sep 17 00:00:00 2001 From: RickiNano <81099017+RickiNano@users.noreply.github.com> Date: Tue, 9 Jul 2024 17:06:03 +0200 Subject: [PATCH] Clean up and align logging output --- nano/secure/ledger.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nano/secure/ledger.cpp b/nano/secure/ledger.cpp index df032b87eb..86fc95174f 100644 --- a/nano/secure/ledger.cpp +++ b/nano/secure/ledger.cpp @@ -1244,13 +1244,13 @@ bool nano::ledger::migrate_lmdb_to_rocksdb (std::filesystem::path const & data_p // Open rocksdb database nano::rocksdb_config rocksdb_config; rocksdb_config.enable = true; - //rocksdb_config.memory_multiplier = 4; + auto rocksdb_store = nano::make_store (logger, data_path_a, nano::dev::constants, false, true, rocksdb_config); if (!rocksdb_store->init_error ()) { auto table_size = store.count (store.tx_begin_read (), tables::blocks); - logger.info (nano::log::type::ledger, "Step 1 of 7: Converting {} million entries from blocks table", table_size / 1000000); + logger.info (nano::log::type::ledger, "Step 1 of 7: Converting {} entries from blocks table", table_size); std::atomic count = 0; auto refresh_interval = 100ms; store.block.for_each_par ( @@ -1269,7 +1269,7 @@ bool nano::ledger::migrate_lmdb_to_rocksdb (std::filesystem::path const & data_p if (auto count_l = ++count; count_l % 5000000 == 0) { - logger.info (nano::log::type::ledger, "{} million blocks converted", count_l / 1000000); + logger.info (nano::log::type::ledger, "{} blocks converted", count_l); } } }); @@ -1383,7 +1383,7 @@ bool nano::ledger::migrate_lmdb_to_rocksdb (std::filesystem::path const & data_p }); logger.info (nano::log::type::ledger, "Finished converting {} entries", count.load ()); - logger.info (nano::log::type::ledger, "Finalizing migration..."); + logger.info (nano::log::type::ledger, "Finalizing and verifying migration..."); auto lmdb_transaction (store.tx_begin_read ()); auto version = store.version.get (lmdb_transaction); auto rocksdb_transaction (rocksdb_store->tx_begin_write ());