From 0fc7272e9cb068fe95921cea0eb59e95bfebdde4 Mon Sep 17 00:00:00 2001 From: Tumas Date: Wed, 20 Mar 2024 14:22:43 +0200 Subject: [PATCH] Use genesis_fork_version from ChainConfig in /eth/v1/beacon/genesis --- http_api/src/standard.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/http_api/src/standard.rs b/http_api/src/standard.rs index 8f0467e4..b9b8e731 100644 --- a/http_api/src/standard.rs +++ b/http_api/src/standard.rs @@ -426,6 +426,7 @@ pub struct RemoteKeysDeleteQuery { /// `GET /eth/v1/beacon/genesis` pub async fn genesis( + State(chain_config): State>, State(genesis_provider): State>, ) -> Result, Error> { let genesis_state = genesis_provider.state(); @@ -433,7 +434,7 @@ pub async fn genesis( let response = GetGenesisResponse { genesis_time: genesis_state.genesis_time(), genesis_validators_root: genesis_state.genesis_validators_root(), - genesis_fork_version: genesis_state.fork().current_version, + genesis_fork_version: chain_config.genesis_fork_version, }; Ok(EthResponse::json(response))