Return syncing on HTTP when sync is stalled (#6129)

* Return syncing even when sync is stalled

* Add test
This commit is contained in:
Michael Sproul
2024-07-19 17:59:51 +10:00
committed by GitHub
parent adfa512893
commit 54e36f6319
2 changed files with 40 additions and 4 deletions

View File

@@ -2888,7 +2888,7 @@ pub fn serve<T: BeaconChainTypes>(
.map_err(warp_utils::reject::beacon_chain_error)?;
let syncing_data = api_types::SyncingData {
is_syncing: network_globals.sync_state.read().is_syncing(),
is_syncing: !network_globals.sync_state.read().is_synced(),
is_optimistic: Some(is_optimistic),
el_offline: Some(el_offline),
head_slot,