aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-08-15 17:03:35 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-08-15 17:03:35 -0500
commit4745e3be22b92e57932d4813124f6b772e30954d (patch)
treecbb79ba99037c3fab275251fd9c4a5db609484e6 /src
parentMerge pull request #3528 (diff)
parent[monerod] Added blocks remaining count during syncronisation. (diff)
downloadmonero-4745e3be22b92e57932d4813124f6b772e30954d.tar.xz
Merge pull request #4020
c24a0af [monerod] Added blocks remaining count during syncronisation. (Jorropo)
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_handler.inl15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
index 56aa1dc06..a931d3b57 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl
+++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
@@ -1168,8 +1168,20 @@ skip:
+ " blocks/sec), " + std::to_string(m_block_queue.get_data_size() / 1048576.f) + " MB queued";
if (ELPP->vRegistry()->allowed(el::Level::Debug, "sync-info"))
timing_message += std::string(": ") + m_block_queue.get_overview();
- MGINFO_YELLOW(context << " Synced " << m_core.get_current_blockchain_height() << "/" << m_core.get_target_blockchain_height()
+ if(m_core.get_target_blockchain_height() == 0){
+ MGINFO_YELLOW(context << " Synced " << m_core.get_current_blockchain_height() << "/" << m_core.get_target_blockchain_height()
<< timing_message);
+ } else {
+ const int completition_percent = (m_core.get_current_blockchain_height() * 100 / m_core.get_target_blockchain_height());
+ if(completition_percent < 99) {//printing completion percent only if % is < of 99 cause for 99 >= this is useless
+ MGINFO_YELLOW(context << " Synced " << m_core.get_current_blockchain_height() << "/" << m_core.get_target_blockchain_height()
+ << " (" << completition_percent << "% " << (m_core.get_target_blockchain_height() - m_core.get_current_blockchain_height())
+ << " blocks remaining)" << timing_message);
+ } else {
+ MGINFO_YELLOW(context << " Synced " << m_core.get_current_blockchain_height() << "/" << m_core.get_target_blockchain_height()
+ << timing_message);
+ }
+ }
}
}
}
@@ -1753,3 +1765,4 @@ skip:
m_core.stop();
}
} // namespace
+