mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 04:48:21 +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),
|
||||
})
|
||||
}
|
||||
// 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 => {
|
||||
debug!(
|
||||
self.log, "Invalid block received";
|
||||
|
||||
Reference in New Issue
Block a user