diff options
author | rbrunner7 <rbrunner@dreamshare.ch> | 2019-12-27 14:31:13 +0100 |
---|---|---|
committer | rbrunner7 <rbrunner@dreamshare.ch> | 2020-03-21 07:32:55 +0100 |
commit | 387fd668d18526329c051ad2ba6202fd79846971 (patch) | |
tree | dd9f5bbf4f96b460ec0d268b682a82b1b9c1df86 /src/cryptonote_protocol/cryptonote_protocol_handler.h | |
parent | Merge pull request #6388 (diff) | |
download | monero-387fd668d18526329c051ad2ba6202fd79846971.tar.xz |
Daemon: Print estimates for time until fully synced
Diffstat (limited to 'src/cryptonote_protocol/cryptonote_protocol_handler.h')
-rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_handler.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.h b/src/cryptonote_protocol/cryptonote_protocol_handler.h index ddbd45a61..cb3b26605 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.h +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.h @@ -169,6 +169,14 @@ namespace cryptonote size_t m_block_download_max_size; bool m_sync_pruned_blocks; + // Values for sync time estimates + boost::posix_time::ptime m_sync_start_time; + boost::posix_time::ptime m_period_start_time; + uint64_t m_sync_start_height; + uint64_t m_period_start_height; + uint64_t get_estimated_remaining_sync_seconds(uint64_t current_blockchain_height, uint64_t target_blockchain_height); + std::string get_periodic_sync_estimate(uint64_t current_blockchain_height, uint64_t target_blockchain_height); + boost::mutex m_buffer_mutex; double get_avg_block_size(); boost::circular_buffer<size_t> m_avg_buffer = boost::circular_buffer<size_t>(10); |