mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Consolidate reqwest versions (#8452)
Update `reqwest` to 0.12 so we only depend on a single version. This should slightly improve compile times and reduce binary bloat. Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
@@ -46,6 +46,7 @@ pub use block_id::BlockId;
|
||||
use builder_states::get_next_withdrawals;
|
||||
use bytes::Bytes;
|
||||
use directory::DEFAULT_ROOT_DIR;
|
||||
use eth2::StatusCode;
|
||||
use eth2::types::{
|
||||
self as api_types, BroadcastValidation, ContextDeserialize, EndpointVersion, ForkChoice,
|
||||
ForkChoiceExtraData, ForkChoiceNode, LightClientUpdatesQuery, PublishBlockRequest,
|
||||
@@ -103,7 +104,6 @@ use version::{
|
||||
unsupported_version_rejection,
|
||||
};
|
||||
use warp::Reply;
|
||||
use warp::http::StatusCode;
|
||||
use warp::hyper::Body;
|
||||
use warp::sse::Event;
|
||||
use warp::{Filter, Rejection, http::Response};
|
||||
@@ -4097,7 +4097,7 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
convert_rejection(rx.await.unwrap_or_else(|_| {
|
||||
Ok(warp::reply::with_status(
|
||||
warp::reply::json(&"No response from channel"),
|
||||
eth2::StatusCode::INTERNAL_SERVER_ERROR,
|
||||
warp::http::StatusCode::INTERNAL_SERVER_ERROR,
|
||||
)
|
||||
.into_response())
|
||||
}))
|
||||
|
||||
@@ -9,9 +9,12 @@ use beacon_chain::{
|
||||
AvailabilityProcessingStatus, BeaconChain, BeaconChainError, BeaconChainTypes, BlockError,
|
||||
IntoGossipVerifiedBlock, NotifyExecutionLayer, build_blob_data_column_sidecars,
|
||||
};
|
||||
use eth2::types::{
|
||||
BlobsBundle, BroadcastValidation, ErrorMessage, ExecutionPayloadAndBlobs, FullPayloadContents,
|
||||
PublishBlockRequest, SignedBlockContents,
|
||||
use eth2::{
|
||||
StatusCode,
|
||||
types::{
|
||||
BlobsBundle, BroadcastValidation, ErrorMessage, ExecutionPayloadAndBlobs,
|
||||
FullPayloadContents, PublishBlockRequest, SignedBlockContents,
|
||||
},
|
||||
};
|
||||
use execution_layer::{ProvenancedPayload, SubmitBlindedBlockResponse};
|
||||
use futures::TryFutureExt;
|
||||
@@ -32,7 +35,6 @@ use types::{
|
||||
DataColumnSubnetId, EthSpec, ExecPayload, ExecutionBlockHash, ForkName, FullPayload,
|
||||
FullPayloadBellatrix, Hash256, KzgProofs, SignedBeaconBlock, SignedBlindedBeaconBlock,
|
||||
};
|
||||
use warp::http::StatusCode;
|
||||
use warp::{Rejection, Reply, reply::Response};
|
||||
|
||||
pub type UnverifiedBlobs<T> = Option<(
|
||||
@@ -302,7 +304,7 @@ pub async fn publish_block<T: BeaconChainTypes, B: IntoGossipVerifiedBlock<T>>(
|
||||
message: "duplicate block".to_string(),
|
||||
stacktraces: vec![],
|
||||
}),
|
||||
duplicate_status_code,
|
||||
warp_utils::status_code::convert(duplicate_status_code)?,
|
||||
)
|
||||
.into_response())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user