mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
[NOD-798] Disconnect from a peer if a block received from it gets rejected (#648)
* [NOD-798] Disconnect from a peer if its block gets rejected. * [NOD-798] Make a comment less ambiguous.
This commit is contained in:
parent
707a728656
commit
a1c631be62
@ -512,6 +512,9 @@ func (sm *SyncManager) handleBlockMsg(bmsg *blockMsg) {
|
||||
// send it.
|
||||
code, reason := mempool.ErrToRejectErr(err)
|
||||
peer.PushRejectMsg(wire.CmdBlock, code, reason, blockHash, false)
|
||||
|
||||
// Disconnect from the misbehaving peer.
|
||||
peer.Disconnect()
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user