mirror of
https://github.com/monero-project/monero.git
synced 2026-07-28 14:47:15 -07:00
p2p: restore safe sync mode when target height drops
This commit is contained in:
@@ -2873,6 +2873,8 @@ skip:
|
|||||||
{
|
{
|
||||||
MINFO("Target height decreasing from " << previous_target << " to " << target);
|
MINFO("Target height decreasing from " << previous_target << " to " << target);
|
||||||
m_core.set_target_blockchain_height(target);
|
m_core.set_target_blockchain_height(target);
|
||||||
|
if (target < m_core.get_current_blockchain_height() + 5)
|
||||||
|
m_core.safesyncmode(true);
|
||||||
if (target == 0 && context.m_state > cryptonote_connection_context::state_before_handshake && !m_stopping)
|
if (target == 0 && context.m_state > cryptonote_connection_context::state_before_handshake && !m_stopping)
|
||||||
{
|
{
|
||||||
MCWARNING("global", "monerod is now disconnected from the network");
|
MCWARNING("global", "monerod is now disconnected from the network");
|
||||||
|
|||||||
Reference in New Issue
Block a user