mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-30 03:03:45 +00:00
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:
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user