Skip to content

Commit

Permalink
Merge pull request #5102 from wubin01/sync_block_process_opt
Browse files Browse the repository at this point in the history
feat(net): optimize processSyncBlock function logic
  • Loading branch information
xxo1shine authored Mar 30, 2023
2 parents e88bf90 + c2dc408 commit fee70c2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit fee70c2

Please sign in to comment.