From c2dc4081b46fa6bc768d44b1536488db44a423c4 Mon Sep 17 00:00:00 2001 From: wubin01 Date: Thu, 30 Mar 2023 12:02:39 +0800 Subject: [PATCH] feat(net): optimize processSyncBlock function logic --- .../main/java/org/tron/core/net/service/sync/SyncService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/main/java/org/tron/core/net/service/sync/SyncService.java b/framework/src/main/java/org/tron/core/net/service/sync/SyncService.java index 5b8ea730e99..68f113afd9f 100644 --- a/framework/src/main/java/org/tron/core/net/service/sync/SyncService.java +++ b/framework/src/main/java/org/tron/core/net/service/sync/SyncService.java @@ -292,7 +292,7 @@ private void processSyncBlock(BlockCapsule block) { if (peer.getSyncBlockInProcess().remove(blockId)) { if (flag) { peer.setBlockBothHave(blockId); - if (peer.getSyncBlockToFetch().isEmpty()) { + if (peer.getSyncBlockToFetch().isEmpty() && !peer.isFetchAble()) { syncNext(peer); } } else {