From 1715e787e653f8513c3694f7915af22f36b50b58 Mon Sep 17 00:00:00 2001 From: RickiNano <81099017+RickiNano@users.noreply.github.com> Date: Tue, 9 Jul 2024 19:31:53 +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 b23b55aba4..0aa3aae20c 100644 --- a/nano/secure/ledger.cpp +++ b/nano/secure/ledger.cpp @@ -1270,7 +1270,7 @@ bool nano::ledger::migrate_lmdb_to_rocksdb (std::filesystem::path const & data_p 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; store.block.for_each_par ( [&] (store::read_transaction const & /*unused*/, auto i, auto n) { @@ -1288,7 +1288,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); } } }); @@ -1392,7 +1392,7 @@ bool nano::ledger::migrate_lmdb_to_rocksdb (std::filesystem::path const & data_p auto rocksdb_transaction (rocksdb_store->tx_begin_write ({}, { nano::tables::final_votes })); for (; i != n; ++i) { - rocksdb_transaction.refresh_if_needed (refresh_interval); + rocksdb_transaction.refresh_if_needed (); rocksdb_store->final_vote.put (rocksdb_transaction, i->first, i->second); if (auto count_l = ++count; count_l % 500000 == 0) { @@ -1402,7 +1402,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 ());