Permalink
Browse files

Switch to unsafe sync mode after a few blocks

  • Loading branch information...
miltonf committed Dec 8, 2018
1 parent d9858b7 commit 2c78dc01aae6cbef447faa25a06371338b72aef8
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/cryptonote_protocol/cryptonote_protocol_handler.inl
@@ -308,7 +308,8 @@ 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);
if (hshd.current_height >= m_core.get_current_blockchain_height() + 5)
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;

0 comments on commit 2c78dc0

Please sign in to comment.