mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-16 03:12:41 +00:00
Merge branch 'unstable' into vc-fallback
This commit is contained in:
@@ -104,15 +104,15 @@ pub fn start_fallback_updater_service<T: SlotClock + 'static, E: EthSpec>(
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Error<E> {
|
||||
pub enum Error<T> {
|
||||
/// The node was unavailable and we didn't attempt to contact it.
|
||||
Unavailable(CandidateError),
|
||||
/// We attempted to contact the node but it failed.
|
||||
RequestFailed(E),
|
||||
RequestFailed(T),
|
||||
}
|
||||
|
||||
impl<E> Error<E> {
|
||||
pub fn request_failure(&self) -> Option<&E> {
|
||||
impl<T> Error<T> {
|
||||
pub fn request_failure(&self) -> Option<&T> {
|
||||
match self {
|
||||
Error::RequestFailed(e) => Some(e),
|
||||
_ => None,
|
||||
@@ -121,9 +121,9 @@ impl<E> Error<E> {
|
||||
}
|
||||
|
||||
/// The list of errors encountered whilst attempting to perform a query.
|
||||
pub struct Errors<E>(pub Vec<(String, Error<E>)>);
|
||||
pub struct Errors<T>(pub Vec<(String, Error<T>)>);
|
||||
|
||||
impl<E: Debug> fmt::Display for Errors<E> {
|
||||
impl<T: Debug> fmt::Display for Errors<T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
if !self.0.is_empty() {
|
||||
write!(f, "Some endpoints failed, num_failed: {}", self.0.len())?;
|
||||
@@ -332,6 +332,14 @@ impl<E: EthSpec> CandidateBeaconNode<E> {
|
||||
"endpoint_deneb_fork_epoch" => ?beacon_node_spec.deneb_fork_epoch,
|
||||
"hint" => UPDATE_REQUIRED_LOG_HINT,
|
||||
);
|
||||
} else if beacon_node_spec.electra_fork_epoch != spec.electra_fork_epoch {
|
||||
warn!(
|
||||
log,
|
||||
"Beacon node has mismatched Electra fork epoch";
|
||||
"endpoint" => %self.beacon_node,
|
||||
"endpoint_electra_fork_epoch" => ?beacon_node_spec.electra_fork_epoch,
|
||||
"hint" => UPDATE_REQUIRED_LOG_HINT,
|
||||
);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user