mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
protocol: do not switch to unsafe sync mode for just a few blocks
This commit is contained in:
parent
22a4cb0609
commit
49cf41a61d
1 changed files with 2 additions and 1 deletions
|
@ -308,6 +308,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) "
|
<< " [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"))
|
<< (0 <= diff ? std::string("behind") : std::string("ahead"))
|
||||||
<< "] " << ENDL << "SYNCHRONIZATION started");
|
<< "] " << ENDL << "SYNCHRONIZATION started");
|
||||||
|
if (hshd.current_height >= m_core.get_current_blockchain_height() + 5) // don't switch to unsafe mode just for a few blocks
|
||||||
m_core.safesyncmode(false);
|
m_core.safesyncmode(false);
|
||||||
}
|
}
|
||||||
LOG_PRINT_L1("Remote blockchain height: " << hshd.current_height << ", id: " << hshd.top_id);
|
LOG_PRINT_L1("Remote blockchain height: " << hshd.current_height << ", id: " << hshd.top_id);
|
||||||
|
|
Loading…
Reference in a new issue