mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-02 04:14:33 +00:00
Bump warp and begin axum migration (#9001)
- Bump `warp` to 0.4. This unifies `warp` and `axum` onto the same `http`, `hyper`, `h2`, `rustls`, etc versions. - Create `axum_utils` which contain common functions and types - Begins migration of all HTTP API servers from warp to axum Co-Authored-By: Mac L <mjladson@pm.me>
This commit is contained in:
@@ -6,10 +6,7 @@ use eth2::types::{self, EndpointVersion, Hash256, Slot};
|
||||
use std::sync::Arc;
|
||||
use types::beacon_response::EmptyMetadata;
|
||||
use types::{CommitteeIndex, ForkVersionedResponse};
|
||||
use warp::{
|
||||
hyper::{Body, Response},
|
||||
reply::Reply,
|
||||
};
|
||||
use warp::reply::{Reply, Response};
|
||||
|
||||
pub fn get_aggregate_attestation<T: BeaconChainTypes>(
|
||||
slot: Slot,
|
||||
@@ -17,7 +14,7 @@ pub fn get_aggregate_attestation<T: BeaconChainTypes>(
|
||||
committee_index: Option<CommitteeIndex>,
|
||||
endpoint_version: EndpointVersion,
|
||||
chain: Arc<BeaconChain<T>>,
|
||||
) -> Result<Response<Body>, warp::reject::Rejection> {
|
||||
) -> Result<Response, warp::reject::Rejection> {
|
||||
let fork_name = chain.spec.fork_name_at_slot::<T::EthSpec>(slot);
|
||||
let aggregate_attestation = if fork_name.electra_enabled() {
|
||||
let Some(committee_index) = committee_index else {
|
||||
|
||||
Reference in New Issue
Block a user