mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
Remove backwards compatibility for el_offline and is_optimstic (#6168)
* Remove Option around is_optimistic and el_offline
This commit is contained in:
@@ -2889,8 +2889,8 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
|
||||
let syncing_data = api_types::SyncingData {
|
||||
is_syncing: !network_globals.sync_state.read().is_synced(),
|
||||
is_optimistic: Some(is_optimistic),
|
||||
el_offline: Some(el_offline),
|
||||
is_optimistic,
|
||||
el_offline,
|
||||
head_slot,
|
||||
sync_distance,
|
||||
};
|
||||
|
||||
@@ -56,8 +56,8 @@ async fn el_syncing_then_synced() {
|
||||
mock_el.el.upcheck().await;
|
||||
|
||||
let api_response = tester.client.get_node_syncing().await.unwrap().data;
|
||||
assert_eq!(api_response.el_offline, Some(false));
|
||||
assert_eq!(api_response.is_optimistic, Some(false));
|
||||
assert_eq!(api_response.el_offline, false);
|
||||
assert_eq!(api_response.is_optimistic, false);
|
||||
assert_eq!(api_response.is_syncing, false);
|
||||
|
||||
// EL synced
|
||||
@@ -65,8 +65,8 @@ async fn el_syncing_then_synced() {
|
||||
mock_el.el.upcheck().await;
|
||||
|
||||
let api_response = tester.client.get_node_syncing().await.unwrap().data;
|
||||
assert_eq!(api_response.el_offline, Some(false));
|
||||
assert_eq!(api_response.is_optimistic, Some(false));
|
||||
assert_eq!(api_response.el_offline, false);
|
||||
assert_eq!(api_response.is_optimistic, false);
|
||||
assert_eq!(api_response.is_syncing, false);
|
||||
}
|
||||
|
||||
@@ -84,8 +84,8 @@ async fn el_offline() {
|
||||
mock_el.el.upcheck().await;
|
||||
|
||||
let api_response = tester.client.get_node_syncing().await.unwrap().data;
|
||||
assert_eq!(api_response.el_offline, Some(true));
|
||||
assert_eq!(api_response.is_optimistic, Some(false));
|
||||
assert_eq!(api_response.el_offline, true);
|
||||
assert_eq!(api_response.is_optimistic, false);
|
||||
assert_eq!(api_response.is_syncing, false);
|
||||
}
|
||||
|
||||
@@ -127,8 +127,8 @@ async fn el_error_on_new_payload() {
|
||||
|
||||
// The EL should now be *offline* according to the API.
|
||||
let api_response = tester.client.get_node_syncing().await.unwrap().data;
|
||||
assert_eq!(api_response.el_offline, Some(true));
|
||||
assert_eq!(api_response.is_optimistic, Some(false));
|
||||
assert_eq!(api_response.el_offline, true);
|
||||
assert_eq!(api_response.is_optimistic, false);
|
||||
assert_eq!(api_response.is_syncing, false);
|
||||
|
||||
// Processing a block successfully should remove the status.
|
||||
@@ -143,8 +143,8 @@ async fn el_error_on_new_payload() {
|
||||
harness.process_block_result((block, blobs)).await.unwrap();
|
||||
|
||||
let api_response = tester.client.get_node_syncing().await.unwrap().data;
|
||||
assert_eq!(api_response.el_offline, Some(false));
|
||||
assert_eq!(api_response.is_optimistic, Some(false));
|
||||
assert_eq!(api_response.el_offline, false);
|
||||
assert_eq!(api_response.is_optimistic, false);
|
||||
assert_eq!(api_response.is_syncing, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -2159,9 +2159,9 @@ impl ApiTester {
|
||||
|
||||
let expected = SyncingData {
|
||||
is_syncing: false,
|
||||
is_optimistic: Some(false),
|
||||
is_optimistic: false,
|
||||
// these tests run without the Bellatrix fork enabled
|
||||
el_offline: Some(true),
|
||||
el_offline: true,
|
||||
head_slot,
|
||||
sync_distance,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user