mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 12:11:59 +00:00
compile
This commit is contained in:
@@ -10,7 +10,7 @@ use serde::de::DeserializeOwned;
|
||||
use serde_json::json;
|
||||
|
||||
use std::time::Duration;
|
||||
use types::{EthSpec, FullPayload, execution_payload::BlobsBundle};
|
||||
use types::{EthSpec, FullPayload};
|
||||
|
||||
pub use deposit_log::{DepositLog, Log};
|
||||
pub use reqwest::Client;
|
||||
@@ -671,14 +671,18 @@ impl HttpJsonRpc {
|
||||
pub async fn get_blobs_bundle_v1<T: EthSpec>(
|
||||
&self,
|
||||
payload_id: PayloadId,
|
||||
) -> Result<BlobsBundle<T>, Error> {
|
||||
) -> Result<JsonBlobBundlesV1<T>, Error> {
|
||||
let params = json!([JsonPayloadIdRequest::from(payload_id)]);
|
||||
|
||||
let response: JsonBlobBundlesV1<T> = self
|
||||
.rpc_request(ENGINE_GET_BLOBS_BUNDLE_V1, params, ENGINE_GET_BLOBS_BUNDLE_TIMEOUT)
|
||||
.rpc_request(
|
||||
ENGINE_GET_BLOBS_BUNDLE_V1,
|
||||
params,
|
||||
ENGINE_GET_BLOBS_BUNDLE_TIMEOUT,
|
||||
)
|
||||
.await?;
|
||||
|
||||
Ok(response.into())
|
||||
Ok(response)
|
||||
}
|
||||
|
||||
pub async fn forkchoice_updated_v1(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use super::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use types::{EthSpec, ExecutionBlockHash, FixedVector, Transaction, Unsigned, VariableList, execution_payload::BlobsBundle};
|
||||
use types::{EthSpec, ExecutionBlockHash, FixedVector, Transaction, Unsigned, VariableList};
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
@@ -278,45 +278,6 @@ pub struct JsonBlobBundlesV1<T: EthSpec> {
|
||||
pub aggregated_proof: KzgProof,
|
||||
}
|
||||
|
||||
impl <T: EthSpec> From<BlobsBundle<T>> for JsonBlobBundlesV1<T> {
|
||||
fn from(p: BlobsBundle<T>) -> Self {
|
||||
// Use this verbose deconstruction pattern to ensure no field is left unused.
|
||||
let BlobsBundle {
|
||||
block_hash,
|
||||
aggregated_proof,
|
||||
blobs,
|
||||
kzgs,
|
||||
} = p;
|
||||
|
||||
Self {
|
||||
block_hash,
|
||||
aggregated_proof,
|
||||
blobs,
|
||||
kzgs,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl <T: EthSpec> From<JsonBlobBundlesV1<T>> for BlobsBundle<T> {
|
||||
fn from(j: JsonBlobBundlesV1<T>) -> Self {
|
||||
// Use this verbose deconstruction pattern to ensure no field is left unused.
|
||||
let JsonBlobBundlesV1 {
|
||||
block_hash,
|
||||
aggregated_proof,
|
||||
blobs,
|
||||
kzgs,
|
||||
} = j;
|
||||
|
||||
Self {
|
||||
block_hash,
|
||||
aggregated_proof,
|
||||
blobs,
|
||||
kzgs,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct JsonForkChoiceStateV1 {
|
||||
|
||||
Reference in New Issue
Block a user