mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 04:01:51 +00:00
Merge remote-tracking branch 'upstream/unstable'
This commit is contained in:
@@ -2126,14 +2126,7 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
task_spawner: TaskSpawner<T::EthSpec>,
|
||||
eth1_service: eth1::Service| {
|
||||
task_spawner.blocking_response_task(Priority::P1, move || match accept_header {
|
||||
Some(api_types::Accept::Json) | None => {
|
||||
let snapshot = eth1_service.get_deposit_snapshot();
|
||||
Ok(
|
||||
warp::reply::json(&api_types::GenericResponse::from(snapshot))
|
||||
.into_response(),
|
||||
)
|
||||
}
|
||||
_ => eth1_service
|
||||
Some(api_types::Accept::Ssz) => eth1_service
|
||||
.get_deposit_snapshot()
|
||||
.map(|snapshot| {
|
||||
Response::builder()
|
||||
@@ -2159,6 +2152,13 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
))
|
||||
})
|
||||
}),
|
||||
_ => {
|
||||
let snapshot = eth1_service.get_deposit_snapshot();
|
||||
Ok(
|
||||
warp::reply::json(&api_types::GenericResponse::from(snapshot))
|
||||
.into_response(),
|
||||
)
|
||||
}
|
||||
})
|
||||
},
|
||||
);
|
||||
|
||||
@@ -19,8 +19,8 @@ use std::time::Duration;
|
||||
use tokio::sync::mpsc::UnboundedSender;
|
||||
use tree_hash::TreeHash;
|
||||
use types::{
|
||||
AbstractExecPayload, BeaconBlockRef, BlobSidecarList, EthSpec, ExecPayload, ExecutionBlockHash,
|
||||
ForkName, FullPayload, FullPayloadBellatrix, Hash256, SignedBeaconBlock,
|
||||
AbstractExecPayload, BeaconBlockRef, BlobSidecarList, BlockImportSource, EthSpec, ExecPayload,
|
||||
ExecutionBlockHash, ForkName, FullPayload, FullPayloadBellatrix, Hash256, SignedBeaconBlock,
|
||||
SignedBlindedBeaconBlock, VariableList,
|
||||
};
|
||||
use warp::http::StatusCode;
|
||||
@@ -230,6 +230,7 @@ pub async fn publish_block<T: BeaconChainTypes, B: IntoGossipVerifiedBlockConten
|
||||
block_root,
|
||||
gossip_verified_block,
|
||||
NotifyExecutionLayer::Yes,
|
||||
BlockImportSource::HttpApi,
|
||||
publish_fn,
|
||||
))
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user