mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 00:42:42 +00:00
Ban peers with banned payloads
This commit is contained in:
@@ -800,6 +800,18 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
|||||||
peer_action: Some(PeerAction::LowToleranceError),
|
peer_action: Some(PeerAction::LowToleranceError),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// Penalise peers for sending us banned blocks.
|
||||||
|
BlockError::KnownInvalidExecutionPayload(block_root) => {
|
||||||
|
warn!(
|
||||||
|
self.log,
|
||||||
|
"Received block known to be invalid";
|
||||||
|
"block_root" => ?block_root,
|
||||||
|
);
|
||||||
|
Err(ChainSegmentFailed {
|
||||||
|
message: format!("Banned block: {block_root:?}"),
|
||||||
|
peer_action: Some(PeerAction::LowToleranceError),
|
||||||
|
})
|
||||||
|
}
|
||||||
other => {
|
other => {
|
||||||
debug!(
|
debug!(
|
||||||
self.log, "Invalid block received";
|
self.log, "Invalid block received";
|
||||||
|
|||||||
Reference in New Issue
Block a user