mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-29 17:18:08 -05:00
fix(rpc): engine_getPayloadBodiesByRangeV1 params are quantity (#1986)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use jsonrpsee::{core::RpcResult as Result, proc_macros::rpc};
|
||||
use reth_primitives::{BlockHash, BlockNumber, H64};
|
||||
use reth_primitives::{BlockHash, H64, U64};
|
||||
use reth_rpc_types::engine::{
|
||||
ExecutionPayload, ExecutionPayloadBodies, ForkchoiceState, ForkchoiceUpdated,
|
||||
PayloadAttributes, PayloadStatus, TransitionConfiguration,
|
||||
@@ -56,8 +56,8 @@ pub trait EngineApi {
|
||||
#[method(name = "engine_getPayloadBodiesByRangeV1")]
|
||||
async fn get_payload_bodies_by_range_v1(
|
||||
&self,
|
||||
start: BlockNumber,
|
||||
count: u64,
|
||||
start: U64,
|
||||
count: U64,
|
||||
) -> Result<ExecutionPayloadBodies>;
|
||||
|
||||
/// See also <https://github.com/ethereum/execution-apis/blob/6709c2a795b707202e93c4f2867fa0bf2640a84f/src/engine/paris.md#engine_exchangetransitionconfigurationv1>
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::result::rpc_err;
|
||||
use async_trait::async_trait;
|
||||
use jsonrpsee::{
|
||||
@@ -7,7 +5,7 @@ use jsonrpsee::{
|
||||
types::error::INVALID_PARAMS_CODE,
|
||||
};
|
||||
use reth_interfaces::consensus::ForkchoiceState;
|
||||
use reth_primitives::{BlockHash, BlockNumber, ChainSpec, Hardfork, H64};
|
||||
use reth_primitives::{BlockHash, ChainSpec, Hardfork, H64, U64};
|
||||
use reth_rpc_api::EngineApiServer;
|
||||
use reth_rpc_engine_api::{
|
||||
EngineApiError, EngineApiHandle, EngineApiMessage, EngineApiMessageVersion, EngineApiResult,
|
||||
@@ -17,6 +15,7 @@ use reth_rpc_types::engine::{
|
||||
ExecutionPayload, ExecutionPayloadBodies, ForkchoiceUpdated, PayloadAttributes, PayloadStatus,
|
||||
TransitionConfiguration, CAPABILITIES,
|
||||
};
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::oneshot::{self, Receiver};
|
||||
|
||||
fn to_rpc_error<E: Into<EngineApiError>>(error: E) -> Error {
|
||||
@@ -199,11 +198,15 @@ impl EngineApiServer for EngineApi {
|
||||
/// See also <https://github.com/ethereum/execution-apis/blob/6452a6b194d7db269bf1dbd087a267251d3cc7f8/src/engine/shanghai.md#engine_getpayloadbodiesbyrangev1>
|
||||
async fn get_payload_bodies_by_range_v1(
|
||||
&self,
|
||||
start: BlockNumber,
|
||||
count: u64,
|
||||
start: U64,
|
||||
count: U64,
|
||||
) -> Result<ExecutionPayloadBodies> {
|
||||
let (tx, rx) = oneshot::channel();
|
||||
self.delegate_request(EngineApiMessage::GetPayloadBodiesByRange(start, count, tx), rx).await
|
||||
self.delegate_request(
|
||||
EngineApiMessage::GetPayloadBodiesByRange(start.as_u64(), count.as_u64(), tx),
|
||||
rx,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
/// Handler for `engine_exchangeTransitionConfigurationV1`
|
||||
|
||||
Reference in New Issue
Block a user