From 7fbeedea78d79b683c5ae5c482dce2e8cf1f5896 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Thu, 29 Aug 2024 15:09:25 -0500 Subject: [PATCH] GH-670 Backport fix from GH-671 for testing of syncing --- plugins/net_plugin/net_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/net_plugin/net_plugin.cpp b/plugins/net_plugin/net_plugin.cpp index c052061ff3..d97304b95c 100644 --- a/plugins/net_plugin/net_plugin.cpp +++ b/plugins/net_plugin/net_plugin.cpp @@ -2122,7 +2122,7 @@ namespace eosio { set_state( lib_catchup ); sync_last_requested_num = 0; sync_next_expected_num = chain_info.lib_num + 1; - } else if (is_sync_request_ahead_allowed(sync_next_expected_num)) { + } else if (sync_last_requested_num > 0 && is_sync_request_ahead_allowed(sync_next_expected_num)) { // break } else { peer_dlog(c, "already syncing, start sync ignored");