Add version to the response of beacon API getPendingConsolidations (#8251)

* #7440


  


Co-Authored-By: Tan Chee Keong <tanck@sigmaprime.io>
This commit is contained in:
chonghe
2025-10-21 21:58:10 +08:00
committed by GitHub
parent 66f88f6bb4
commit 040d992132
3 changed files with 30 additions and 13 deletions

View File

@@ -943,7 +943,7 @@ impl BeaconNodeHttpClient {
pub async fn get_beacon_states_pending_consolidations(
&self,
state_id: StateId,
) -> Result<Option<ExecutionOptimisticFinalizedResponse<Vec<PendingConsolidation>>>, Error>
) -> Result<Option<ExecutionOptimisticFinalizedBeaconResponse<Vec<PendingConsolidation>>>, Error>
{
let mut path = self.eth_path(V1)?;
@@ -954,7 +954,9 @@ impl BeaconNodeHttpClient {
.push(&state_id.to_string())
.push("pending_consolidations");
self.get_opt(path).await
self.get_fork_contextual(path, |fork| fork)
.await
.map(|opt| opt.map(BeaconResponse::ForkVersioned))
}
/// `GET beacon/light_client/updates`