mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Improve UX whilst VC is waiting for genesis (#1915)
## Issue Addressed - Resolves #1424 ## Proposed Changes Add a `GET lighthouse/staking` that returns 200 if the node is ready to stake (i.e., `--eth1` flag is present) or a 404 otherwise. Whilst the VC is waiting for the genesis time to start (i.e., when the genesis state is known), check the `lighthouse/staking` endpoint and log an error if the node isn't configured for staking. ## Additional Info NA
This commit is contained in:
@@ -1815,6 +1815,14 @@ impl ApiTester {
|
||||
|
||||
self
|
||||
}
|
||||
|
||||
pub async fn test_get_lighthouse_staking(self) -> Self {
|
||||
let result = self.client.get_lighthouse_staking().await.unwrap();
|
||||
|
||||
assert_eq!(result, self.chain.eth1_chain.is_some());
|
||||
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::test(core_threads = 2)]
|
||||
@@ -2087,5 +2095,7 @@ async fn lighthouse_endpoints() {
|
||||
.test_get_lighthouse_eth1_deposit_cache()
|
||||
.await
|
||||
.test_get_lighthouse_beacon_states_ssz()
|
||||
.await
|
||||
.test_get_lighthouse_staking()
|
||||
.await;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user