mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 04:48:21 +00:00
Cleanup unused code
This commit is contained in:
@@ -29,9 +29,8 @@
|
||||
//!
|
||||
//! Doppelganger protection is a best-effort, last-line-of-defence mitigation. Do not rely upon it.
|
||||
|
||||
use crate::beacon_node_fallback::{BeaconNodeFallback, RequireSynced};
|
||||
use crate::beacon_node_fallback::BeaconNodeFallback;
|
||||
use crate::validator_store::ValidatorStore;
|
||||
use crate::OfflineOnFailure;
|
||||
use environment::RuntimeContext;
|
||||
use eth2::types::LivenessResponseData;
|
||||
use parking_lot::RwLock;
|
||||
@@ -177,17 +176,13 @@ async fn beacon_node_liveness<'a, T: 'static + SlotClock, E: EthSpec>(
|
||||
} else {
|
||||
// Request the previous epoch liveness state from the beacon node.
|
||||
beacon_nodes
|
||||
.first_success(
|
||||
RequireSynced::Yes,
|
||||
OfflineOnFailure::Yes,
|
||||
|beacon_node| async move {
|
||||
beacon_node
|
||||
.post_lighthouse_liveness(validator_indices, previous_epoch)
|
||||
.await
|
||||
.map_err(|e| format!("Failed query for validator liveness: {:?}", e))
|
||||
.map(|result| result.data)
|
||||
},
|
||||
)
|
||||
.first_success(|beacon_node| async move {
|
||||
beacon_node
|
||||
.post_lighthouse_liveness(validator_indices, previous_epoch)
|
||||
.await
|
||||
.map_err(|e| format!("Failed query for validator liveness: {:?}", e))
|
||||
.map(|result| result.data)
|
||||
})
|
||||
.await
|
||||
.unwrap_or_else(|e| {
|
||||
crit!(
|
||||
@@ -204,17 +199,13 @@ async fn beacon_node_liveness<'a, T: 'static + SlotClock, E: EthSpec>(
|
||||
|
||||
// Request the current epoch liveness state from the beacon node.
|
||||
let current_epoch_responses = beacon_nodes
|
||||
.first_success(
|
||||
RequireSynced::Yes,
|
||||
OfflineOnFailure::Yes,
|
||||
|beacon_node| async move {
|
||||
beacon_node
|
||||
.post_lighthouse_liveness(validator_indices, current_epoch)
|
||||
.await
|
||||
.map_err(|e| format!("Failed query for validator liveness: {:?}", e))
|
||||
.map(|result| result.data)
|
||||
},
|
||||
)
|
||||
.first_success(|beacon_node| async move {
|
||||
beacon_node
|
||||
.post_lighthouse_liveness(validator_indices, current_epoch)
|
||||
.await
|
||||
.map_err(|e| format!("Failed query for validator liveness: {:?}", e))
|
||||
.map(|result| result.data)
|
||||
})
|
||||
.await
|
||||
.unwrap_or_else(|e| {
|
||||
crit!(
|
||||
|
||||
Reference in New Issue
Block a user