diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-08-26 23:43:22 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-08-26 23:43:22 +0200 |
commit | 36b978f50e668f06f16607d902be5132412d4d97 (patch) | |
tree | 9d5fd313162a7a43e521dc2e7aff01c27e1ab768 /src/cryptonote_protocol | |
parent | Merge pull request #2313 (diff) | |
parent | Cleanup test impact of adding safesyncmode() method (diff) | |
download | monero-36b978f50e668f06f16607d902be5132412d4d97.tar.xz |
Merge pull request #2314
c22d22e2 Cleanup test impact of adding safesyncmode() method (Howard Chu)
9a859844 Toggle SAFE syncmode on and off automatically (Howard Chu)
Diffstat (limited to 'src/cryptonote_protocol')
-rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_handler.inl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index f27a5d7b8..e762cf9c8 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -303,6 +303,7 @@ namespace cryptonote << " [Your node is " << abs_diff << " blocks (" << ((abs_diff - diff_v2) / (24 * 60 * 60 / DIFFICULTY_TARGET_V1)) + (diff_v2 / (24 * 60 * 60 / DIFFICULTY_TARGET_V2)) << " days) " << (0 <= diff ? std::string("behind") : std::string("ahead")) << "] " << ENDL << "SYNCHRONIZATION started"); + m_core.safesyncmode(false); } LOG_PRINT_L1("Remote blockchain height: " << hshd.current_height << ", id: " << hshd.top_id); context.m_state = cryptonote_connection_context::state_synchronizing; @@ -1513,6 +1514,7 @@ skip: << "**********************************************************************"); m_core.on_synchronized(); } + m_core.safesyncmode(true); return true; } //------------------------------------------------------------------------------------------------------------------------ |