mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
[NOD-1051] Don't disconnect from sync peer if it sends an orphan (#757)
This commit is contained in:
parent
20da1b9c9a
commit
8bbced5925
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user