Skip to content

Commit 0a17184

Browse files
authored
Merge pull request tronprotocol#1389 from tronprotocol/fix-sycn-l
fix sycn bug
2 parents 755cc56 + 142be45 commit 0a17184

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/org/tron/core/net/node/NodeImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -727,16 +727,16 @@ private void onHandleBlockMessage(PeerConnection peer, BlockMessage blkMsg) {
727727
isFetchSyncActive = true;
728728
}
729729
}
730-
}
731-
732-
if (advObjWeRequested.containsKey(item)) {
730+
} else if (advObjWeRequested.containsKey(item)) {
733731
advObjWeRequested.remove(item);
734732
if (!syncFlag) {
735733
processAdvBlock(peer, blkMsg.getBlockCapsule());
736734
startFetchItem();
737735
}
738736
} else {
739737
if (!syncFlag) {//not we request and not sync,disconnect
738+
logger.error("not we request and not sync, disconnect : {}, block : {}",
739+
peer.getInetAddress(), blockId.getString());
740740
banTraitorPeer(peer, ReasonCode.BAD_PROTOCOL);
741741
}
742742
}

0 commit comments

Comments
 (0)