Skip to content

Commit

Permalink
add consensus version header
Browse files Browse the repository at this point in the history
  • Loading branch information
eserilev committed Feb 6, 2025
1 parent 37c9b67 commit 4203b56
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions beacon_node/http_api/src/aggregate_attestation.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::unsupported_version_rejection;
use crate::version::{V1, V2};
use crate::version::{add_consensus_version_header, V1, V2};
use beacon_chain::{BeaconChain, BeaconChainTypes};
use eth2::types::{EndpointVersion, Hash256, Slot};
use std::sync::Arc;
Expand Down Expand Up @@ -40,7 +40,10 @@ pub fn get_aggregate_attestation<T: BeaconChainTypes>(
metadata: EmptyMetadata {},
data: aggregate_attestation,
};
Ok(warp::reply::json(&fork_versioned_response).into_response())
Ok(add_consensus_version_header(
warp::reply::json(&fork_versioned_response).into_response(),
fork_name,
))
} else if endpoint_version == V1 {
let aggregate_attestation = chain
.get_pre_electra_aggregated_attestation_by_slot_and_root(slot, attestation_data_root)
Expand Down

0 comments on commit 4203b56

Please sign in to comment.