aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-11-06 21:32:54 +0200
committerRiccardo Spagni <ric@spagni.net>2018-11-06 21:32:54 +0200
commitda26bc92e99b9cc4fa0e3db894e9d9b8b494c08b (patch)
tree592fd5f051d044c53ea5f5afdbf75dea2c8570f0 /src/blockchain_utilities
parentMerge pull request #4740 (diff)
parentblockchain_utilities: fix logs and cout output colliding (diff)
downloadmonero-da26bc92e99b9cc4fa0e3db894e9d9b8b494c08b.tar.xz
Merge pull request #4742
0a95cdaa blockchain_utilities: fix logs and cout output colliding (moneromooo-monero)
Diffstat (limited to 'src/blockchain_utilities')
-rw-r--r--src/blockchain_utilities/blockchain_import.cpp4
-rw-r--r--src/blockchain_utilities/bootstrap_file.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp
index 7f92ecd87..eae078ea2 100644
--- a/src/blockchain_utilities/blockchain_import.cpp
+++ b/src/blockchain_utilities/blockchain_import.cpp
@@ -396,7 +396,7 @@ int import_from_file(cryptonote::core& core, const std::string& import_file_path
{
std::cout << refresh_string << "block " << h-1
<< " / " << block_stop
- << std::flush;
+ << "\r" << std::flush;
std::cout << ENDL << ENDL;
MINFO("Specified block number reached - stopping. block: " << h-1 << " total blocks: " << h);
quit = 1;
@@ -432,7 +432,7 @@ int import_from_file(cryptonote::core& core, const std::string& import_file_path
{
std::cout << refresh_string << "block " << h-1
<< " / " << block_stop
- << std::flush;
+ << "\r" << std::flush;
}
if (opt_verify)
diff --git a/src/blockchain_utilities/bootstrap_file.cpp b/src/blockchain_utilities/bootstrap_file.cpp
index beaad2abc..a8c46d661 100644
--- a/src/blockchain_utilities/bootstrap_file.cpp
+++ b/src/blockchain_utilities/bootstrap_file.cpp
@@ -304,7 +304,7 @@ bool BootstrapFile::store_blockchain_raw(Blockchain* _blockchain_storage, tx_mem
}
if (m_cur_height % progress_interval == 0) {
std::cout << refresh_string;
- std::cout << "block " << m_cur_height << "/" << block_stop << std::flush;
+ std::cout << "block " << m_cur_height << "/" << block_stop << "\r" << std::flush;
}
}
// NOTE: use of NUM_BLOCKS_PER_CHUNK is a placeholder in case multi-block chunks are later supported.
@@ -479,7 +479,7 @@ uint64_t BootstrapFile::count_blocks(const std::string& import_file_path, std::s
bytes_read += count_bytes(import_file, progress_interval, blocks, quit);
h += blocks;
std::cout << "\r" << "block height: " << h-1 <<
- " " <<
+ " \r" <<
std::flush;
// std::cout << refresh_string;