[NOD-1051] Don't disconnect from sync peer if it sends an orphan (#757)

This commit is contained in:
Ori Newman 2020-06-10 16:05:48 +03:00 committed by GitHub
parent 20da1b9c9a
commit 8bbced5925
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -533,15 +533,6 @@ func (sm *SyncManager) handleBlockMsg(bmsg *blockMsg) {
}
if isOrphan {
// If we received an orphan block from the sync peer, it is
// misbehaving and must be disconnected from.
if peer == sm.syncPeer {
log.Errorf("Received an orphan block %s from sync peer %s. Disconnecting...",
blockHash, peer)
peer.Disconnect()
return
}
// Request the parents for the orphan block from the peer that sent it.
missingAncestors, err := sm.dag.GetOrphanMissingAncestorHashes(blockHash)
if err != nil {