Remove backwards compatibility for el_offline and is_optimstic (#6168)

* Remove Option around is_optimistic and el_offline
This commit is contained in:
Mac L
2024-07-25 04:10:46 +04:00
committed by GitHub
parent b4a7560c0e
commit a3f44c674b
5 changed files with 18 additions and 20 deletions

View File

@@ -36,10 +36,8 @@ pub async fn check_synced<T: SlotClock>(
}
};
// Default EL status to "online" for backwards-compatibility with BNs that don't include it.
let el_offline = resp.data.el_offline.unwrap_or(false);
let bn_is_synced = !resp.data.is_syncing || (resp.data.sync_distance.as_u64() < SYNC_TOLERANCE);
let is_synced = bn_is_synced && !el_offline;
let is_synced = bn_is_synced && !resp.data.el_offline;
if let Some(log) = log_opt {
if !is_synced {
@@ -55,7 +53,7 @@ pub async fn check_synced<T: SlotClock>(
"sync_distance" => resp.data.sync_distance.as_u64(),
"head_slot" => resp.data.head_slot.as_u64(),
"endpoint" => %beacon_node,
"el_offline" => el_offline,
"el_offline" => resp.data.el_offline,
);
}