Skip to content

Commit fee70c2

Browse files
authored
Merge pull request #5102 from wubin01/sync_block_process_opt
feat(net): optimize processSyncBlock function logic
2 parents e88bf90 + c2dc408 commit fee70c2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

framework/src/main/java/org/tron/core/net/service/sync/SyncService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ private void processSyncBlock(BlockCapsule block) {
292292
if (peer.getSyncBlockInProcess().remove(blockId)) {
293293
if (flag) {
294294
peer.setBlockBothHave(blockId);
295-
if (peer.getSyncBlockToFetch().isEmpty()) {
295+
if (peer.getSyncBlockToFetch().isEmpty() && !peer.isFetchAble()) {
296296
syncNext(peer);
297297
}
298298
} else {

0 commit comments

Comments
 (0)