diff options
author | luigi1111 <luigi1111w@gmail.com> | 2020-04-21 08:19:02 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2020-04-21 08:19:02 -0500 |
commit | 9c660e159ee2d9e2f7c7b7f766193792706f90a3 (patch) | |
tree | 33957b18c59fefbf2b2a8ea1b27f85af1540747c /src/cryptonote_protocol/cryptonote_protocol_handler.h | |
parent | Merge pull request #6314 (diff) | |
parent | Daemon: Print estimates for time until fully synced (diff) | |
download | monero-9c660e159ee2d9e2f7c7b7f766193792706f90a3.tar.xz |
Merge pull request #6278
387fd66 Daemon: Print estimates for time until fully synced (rbrunner7)
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 e6479b941..e2ad3727f 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.h +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.h @@ -170,6 +170,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); |