Skip to content

Commit 07e5f75

Browse files
authored
Merge branch 'unstable' into single-attestation-full-implementation
2 parents f437dd5 + 23ad833 commit 07e5f75

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

beacon_node/execution_layer/src/engines.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ const CACHED_RESPONSE_AGE_LIMIT: Duration = Duration::from_secs(900); // 15 minu
2626
/// Stores the remembered state of a engine.
2727
#[derive(Copy, Clone, PartialEq, Debug, Eq, Default)]
2828
enum EngineStateInternal {
29-
Synced,
3029
#[default]
30+
Synced,
3131
Offline,
3232
Syncing,
3333
AuthFailed,
@@ -403,12 +403,17 @@ mod tests {
403403
async fn test_state_notifier() {
404404
let mut state = State::default();
405405
let initial_state: EngineState = state.state.into();
406-
assert_eq!(initial_state, EngineState::Offline);
407-
state.update(EngineStateInternal::Synced);
406+
// default state is online
407+
assert_eq!(initial_state, EngineState::Online);
408408

409409
// a watcher that arrives after the first update.
410410
let mut watcher = state.watch();
411411
let new_state = watcher.next().await.expect("Last state is always present");
412412
assert_eq!(new_state, EngineState::Online);
413+
414+
// update to offline
415+
state.update(EngineStateInternal::Offline);
416+
let new_state = watcher.next().await.expect("Last state is always present");
417+
assert_eq!(new_state, EngineState::Offline);
413418
}
414419
}

beacon_node/http_api/tests/tests.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2569,7 +2569,7 @@ impl ApiTester {
25692569
is_syncing: false,
25702570
is_optimistic: false,
25712571
// these tests run without the Bellatrix fork enabled
2572-
el_offline: true,
2572+
el_offline: false,
25732573
head_slot,
25742574
sync_distance,
25752575
};
@@ -2633,11 +2633,11 @@ impl ApiTester {
26332633
pub async fn test_get_node_health(self) -> Self {
26342634
let status = self.client.get_node_health().await;
26352635
match status {
2636-
Ok(_) => {
2637-
panic!("should return 503 error status code");
2636+
Ok(status) => {
2637+
assert_eq!(status, 200);
26382638
}
2639-
Err(e) => {
2640-
assert_eq!(e.status().unwrap(), 503);
2639+
Err(_) => {
2640+
panic!("should return valid status");
26412641
}
26422642
}
26432643
self

0 commit comments

Comments
 (0)