mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-17 03:42:46 +00:00
Do not penalize peers on execution layer offline errors (#3258)
## Issue Addressed Partly resolves https://github.com/sigp/lighthouse/issues/3032 ## Proposed Changes Extracts some of the functionality of #3094 into a separate PR as the original PR requires a bit more work. Do not unnecessarily penalize peers when we fail to validate received execution payloads because our execution layer is offline.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use super::batch::{BatchInfo, BatchProcessingResult, BatchState};
|
||||
use crate::beacon_processor::ChainSegmentProcessId;
|
||||
use crate::beacon_processor::WorkEvent as BeaconWorkEvent;
|
||||
use crate::beacon_processor::{ChainSegmentProcessId, FailureMode};
|
||||
use crate::sync::{manager::Id, network_context::SyncNetworkContext, BatchProcessResult};
|
||||
use beacon_chain::BeaconChainTypes;
|
||||
use fnv::FnvHashMap;
|
||||
@@ -320,6 +320,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
|
||||
&BatchProcessResult::Failed {
|
||||
imported_blocks: false,
|
||||
peer_action: None,
|
||||
mode: FailureMode::ConsensusLayer,
|
||||
},
|
||||
)
|
||||
} else {
|
||||
@@ -499,6 +500,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
|
||||
BatchProcessResult::Failed {
|
||||
imported_blocks,
|
||||
peer_action,
|
||||
mode: _,
|
||||
} => {
|
||||
let batch = self.batches.get_mut(&batch_id).ok_or_else(|| {
|
||||
RemoveChain::WrongChainState(format!(
|
||||
|
||||
Reference in New Issue
Block a user