mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
FMT
This commit is contained in:
@@ -149,7 +149,10 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
|||||||
}
|
}
|
||||||
// The block failed verification.
|
// The block failed verification.
|
||||||
Err(other) => {
|
Err(other) => {
|
||||||
warn!(reason = other.to_string(), "Execution payload envelope rejected");
|
warn!(
|
||||||
|
reason = other.to_string(),
|
||||||
|
"Execution payload envelope rejected"
|
||||||
|
);
|
||||||
Err(other)
|
Err(other)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,7 +137,11 @@ pub async fn publish_execution_payload_envelope<T: BeaconChainTypes>(
|
|||||||
// GET beacon/execution_payload_envelope/{block_id}
|
// GET beacon/execution_payload_envelope/{block_id}
|
||||||
pub(crate) fn get_beacon_execution_payload_envelope<T: BeaconChainTypes>(
|
pub(crate) fn get_beacon_execution_payload_envelope<T: BeaconChainTypes>(
|
||||||
eth_v1: EthV1Filter,
|
eth_v1: EthV1Filter,
|
||||||
block_id_or_err: impl Filter<Extract = (BlockId,), Error = Rejection> + Clone + Send + Sync + 'static,
|
block_id_or_err: impl Filter<Extract = (BlockId,), Error = Rejection>
|
||||||
|
+ Clone
|
||||||
|
+ Send
|
||||||
|
+ Sync
|
||||||
|
+ 'static,
|
||||||
task_spawner_filter: TaskSpawnerFilter<T>,
|
task_spawner_filter: TaskSpawnerFilter<T>,
|
||||||
chain_filter: ChainFilter<T>,
|
chain_filter: ChainFilter<T>,
|
||||||
) -> ResponseFilter {
|
) -> ResponseFilter {
|
||||||
|
|||||||
@@ -2675,8 +2675,10 @@ impl BeaconNodeHttpClient {
|
|||||||
pub async fn get_beacon_execution_payload_envelope<E: EthSpec>(
|
pub async fn get_beacon_execution_payload_envelope<E: EthSpec>(
|
||||||
&self,
|
&self,
|
||||||
block_id: BlockId,
|
block_id: BlockId,
|
||||||
) -> Result<Option<ExecutionOptimisticFinalizedBeaconResponse<SignedExecutionPayloadEnvelope<E>>>, Error>
|
) -> Result<
|
||||||
{
|
Option<ExecutionOptimisticFinalizedBeaconResponse<SignedExecutionPayloadEnvelope<E>>>,
|
||||||
|
Error,
|
||||||
|
> {
|
||||||
let path = self.get_beacon_execution_payload_envelope_path(block_id)?;
|
let path = self.get_beacon_execution_payload_envelope_path(block_id)?;
|
||||||
self.get_opt(path)
|
self.get_opt(path)
|
||||||
.await
|
.await
|
||||||
@@ -2695,11 +2697,9 @@ impl BeaconNodeHttpClient {
|
|||||||
.get_bytes_opt_accept_header(path, Accept::Ssz, self.timeouts.get_beacon_blocks_ssz)
|
.get_bytes_opt_accept_header(path, Accept::Ssz, self.timeouts.get_beacon_blocks_ssz)
|
||||||
.await?;
|
.await?;
|
||||||
match opt_response {
|
match opt_response {
|
||||||
Some(bytes) => {
|
Some(bytes) => SignedExecutionPayloadEnvelope::from_ssz_bytes(&bytes)
|
||||||
SignedExecutionPayloadEnvelope::from_ssz_bytes(&bytes)
|
|
||||||
.map(Some)
|
.map(Some)
|
||||||
.map_err(Error::InvalidSsz)
|
.map_err(Error::InvalidSsz),
|
||||||
}
|
|
||||||
None => Ok(None),
|
None => Ok(None),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1336,10 +1336,7 @@ impl<E: EthSpec> EventKind<E> {
|
|||||||
)?)),
|
)?)),
|
||||||
"execution_payload_bid" => Ok(EventKind::ExecutionPayloadBid(
|
"execution_payload_bid" => Ok(EventKind::ExecutionPayloadBid(
|
||||||
serde_json::from_str(data).map_err(|e| {
|
serde_json::from_str(data).map_err(|e| {
|
||||||
ServerError::InvalidServerSentEvent(format!(
|
ServerError::InvalidServerSentEvent(format!("Execution Payload Bid: {:?}", e))
|
||||||
"Execution Payload Bid: {:?}",
|
|
||||||
e
|
|
||||||
))
|
|
||||||
})?,
|
})?,
|
||||||
)),
|
)),
|
||||||
"execution_payload_available" => Ok(EventKind::ExecutionPayloadAvailable(
|
"execution_payload_available" => Ok(EventKind::ExecutionPayloadAvailable(
|
||||||
|
|||||||
Reference in New Issue
Block a user