diff --git a/nano/secure/ledger.cpp b/nano/secure/ledger.cpp index 22458cdf14..93335587a5 100644 --- a/nano/secure/ledger.cpp +++ b/nano/secure/ledger.cpp @@ -1242,7 +1242,7 @@ bool nano::ledger::migrate_lmdb_to_rocksdb (std::filesystem::path const & data_p if (!rocksdb_store->init_error ()) { - std::cout << "Step 1 of 7: Converting blocks table..." << std::endl; + std::cout << "Step 1 of 7: Converting blocks table... " << std::endl; std::size_t count = 0; store.block.for_each_par ( [&rocksdb_store, &count] (store::read_transaction const & /*unused*/, auto i, auto n) { @@ -1258,14 +1258,14 @@ bool nano::ledger::migrate_lmdb_to_rocksdb (std::filesystem::path const & data_p } rocksdb_store->block.raw_put (rocksdb_transaction, vector, i->first); - if (count % 250000 == 0 && count != 0) + if (count % 200000 == 0 && count != 0) { std::cout << "." << std::flush; } } }); - std::cout << "Step 2 of 7: Converting pending table..." << std::endl; + std::cout << "\nStep 2 of 7: Converting pending table..." << std::endl; count = 0; store.pending.for_each_par ( [&rocksdb_store, &count] (store::read_transaction const & /*unused*/, auto i, auto n) { @@ -1273,14 +1273,14 @@ bool nano::ledger::migrate_lmdb_to_rocksdb (std::filesystem::path const & data_p { auto rocksdb_transaction (rocksdb_store->tx_begin_write ({}, { nano::tables::pending })); rocksdb_store->pending.put (rocksdb_transaction, i->first, i->second); - if (count % 250000 == 0 && count != 0) + if (count % 50000 == 0 && count != 0) { std::cout << "." << std::flush; } } }); - std::cout << "Step 3 of 7: Converting confirmation_height table..." << std::endl; + std::cout << "\nStep 3 of 7: Converting confirmation_height table..." << std::endl; count = 0; store.confirmation_height.for_each_par ( [&rocksdb_store, &count] (store::read_transaction const & /*unused*/, auto i, auto n) { @@ -1288,14 +1288,14 @@ bool nano::ledger::migrate_lmdb_to_rocksdb (std::filesystem::path const & data_p { auto rocksdb_transaction (rocksdb_store->tx_begin_write ({}, { nano::tables::confirmation_height })); rocksdb_store->confirmation_height.put (rocksdb_transaction, i->first, i->second); - if (count % 250000 == 0 && count != 0) + if (count % 50000 == 0 && count != 0) { std::cout << "." << std::flush; } } }); - std::cout << "Step 4 of 7: Converting accounts height table..." << std::endl; + std::cout << "\nStep 4 of 7: Converting accounts height table..." << std::endl; count = 0; store.account.for_each_par ( [&rocksdb_store, &count] (store::read_transaction const & /*unused*/, auto i, auto n) { @@ -1303,14 +1303,14 @@ bool nano::ledger::migrate_lmdb_to_rocksdb (std::filesystem::path const & data_p { auto rocksdb_transaction (rocksdb_store->tx_begin_write ({}, { nano::tables::accounts })); rocksdb_store->account.put (rocksdb_transaction, i->first, i->second); - if (count % 250000 == 0 && count != 0) + if (count % 50000 == 0 && count != 0) { std::cout << "." << std::flush; } } }); - std::cout << "Step 5 of 7: Converting rep_weights table..." << std::endl; + std::cout << "\nStep 5 of 7: Converting rep_weights table..." << std::endl; count = 0; store.rep_weight.for_each_par ( [&rocksdb_store, &count] (store::read_transaction const & /*unused*/, auto i, auto n) { @@ -1318,14 +1318,14 @@ bool nano::ledger::migrate_lmdb_to_rocksdb (std::filesystem::path const & data_p { auto rocksdb_transaction (rocksdb_store->tx_begin_write ({}, { nano::tables::rep_weights })); rocksdb_store->rep_weight.put (rocksdb_transaction, i->first, i->second.number ()); - if (count % 250000 == 0 && count != 0) + if (count % 50000 == 0 && count != 0) { std::cout << "." << std::flush; } } }); - std::cout << "Step 6 of 7: Converting pruned table..." << std::endl; + std::cout << "\nStep 6 of 7: Converting pruned table..." << std::endl; count = 0; store.pruned.for_each_par ( [&rocksdb_store, &count] (store::read_transaction const & /*unused*/, auto i, auto n) { @@ -1333,14 +1333,14 @@ bool nano::ledger::migrate_lmdb_to_rocksdb (std::filesystem::path const & data_p { auto rocksdb_transaction (rocksdb_store->tx_begin_write ({}, { nano::tables::pruned })); rocksdb_store->pruned.put (rocksdb_transaction, i->first); - if (count % 250000 == 0 && count != 0) + if (count % 100000 == 0 && count != 0) { std::cout << "." << std::flush; } } }); - std::cout << "Step 7 of 7: Converting final_votes table..." << std::endl; + std::cout << "\nStep 7 of 7: Converting final_votes table..." << std::endl; count = 0; store.final_vote.for_each_par ( [&rocksdb_store, &count] (store::read_transaction const & /*unused*/, auto i, auto n) { @@ -1348,14 +1348,14 @@ 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 })); rocksdb_store->final_vote.put (rocksdb_transaction, i->first, i->second); - if (count % 250000 == 0 && count != 0) + if (count % 100000 == 0 && count != 0) { std::cout << "." << std::flush; } } }); - std::cout << "Finalizing migration..." << std::endl; + std::cout << "\nFinalizing migration..." << std::endl; auto lmdb_transaction (store.tx_begin_read ()); auto version = store.version.get (lmdb_transaction); auto rocksdb_transaction (rocksdb_store->tx_begin_write ());