Merge pull request #3817 from ethDreamer/capella

Make engine_getPayloadV2 accept local block value
This commit is contained in:
ethDreamer 2022-12-16 16:05:37 -06:00 committed by GitHub
commit ab11f8c71f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -760,7 +760,7 @@ impl HttpJsonRpc {
) -> Result<ExecutionPayload<T>, Error> {
let params = json!([JsonPayloadIdRequest::from(payload_id)]);
let payload_v2: JsonExecutionPayloadV2<T> = self
let response: JsonGetPayloadResponse<T> = self
.rpc_request(
ENGINE_GET_PAYLOAD_V2,
params,
@ -768,7 +768,7 @@ impl HttpJsonRpc {
)
.await?;
JsonExecutionPayload::V2(payload_v2).try_into_execution_payload(fork_name)
JsonExecutionPayload::V2(response.execution_payload).try_into_execution_payload(fork_name)
}
pub async fn get_blobs_bundle_v1<T: EthSpec>(

View File

@ -324,6 +324,15 @@ impl<T: EthSpec> TryFrom<ExecutionPayload<T>> for JsonExecutionPayloadV2<T> {
}
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(bound = "T: EthSpec", rename_all = "camelCase")]
pub struct JsonGetPayloadResponse<T: EthSpec> {
pub execution_payload: JsonExecutionPayloadV2<T>,
// uncomment this when geth fixes its serialization
//#[serde(with = "eth2_serde_utils::u256_hex_be")]
//pub block_value: Uint256,
}
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct JsonWithdrawal {