mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 22:34:45 +00:00
ContextDeserialize and Beacon API Improvements (#7372)
* #7286 * BeaconAPI is not returning a versioned response when it should for some V1 endpoints * these [strange functions with vX in the name that still accept `endpoint_version` arguments](https://github.com/sigp/lighthouse/blob/stable/beacon_node/http_api/src/produce_block.rs#L192) This refactor is a prerequisite to get the fulu EF tests running.
This commit is contained in:
@@ -4,7 +4,7 @@ use crate::version::{add_consensus_version_header, V1, V2};
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use eth2::types::{self, EndpointVersion, Hash256, Slot};
|
||||
use std::sync::Arc;
|
||||
use types::fork_versioned_response::EmptyMetadata;
|
||||
use types::beacon_response::EmptyMetadata;
|
||||
use types::{CommitteeIndex, ForkVersionedResponse};
|
||||
use warp::{
|
||||
hyper::{Body, Response},
|
||||
@@ -52,7 +52,7 @@ pub fn get_aggregate_attestation<T: BeaconChainTypes>(
|
||||
|
||||
if endpoint_version == V2 {
|
||||
let fork_versioned_response = ForkVersionedResponse {
|
||||
version: Some(fork_name),
|
||||
version: fork_name,
|
||||
metadata: EmptyMetadata {},
|
||||
data: aggregate_attestation,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user