From 14d0b6ac4e69f8cb418ab5b285186af45dafddbf Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 3 Oct 2022 15:36:13 +0200 Subject: [PATCH] fix: make everything compile again --- crates/net/rpc-api/src/debug.rs | 2 +- crates/net/rpc-api/src/engine.rs | 13 +++++-------- crates/net/rpc-api/src/eth.rs | 4 ++-- crates/net/rpc-types/src/eth/engine.rs | 1 + 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/crates/net/rpc-api/src/debug.rs b/crates/net/rpc-api/src/debug.rs index d70bebcc1..8282b8bcd 100644 --- a/crates/net/rpc-api/src/debug.rs +++ b/crates/net/rpc-api/src/debug.rs @@ -22,6 +22,6 @@ pub trait DebugApi { async fn raw_receipts(&self, block_id: BlockId) -> Result>; /// Returns an array of recent bad blocks that the client has seen on the network. - #[method(name = "debug_getRawReceipts")] + #[method(name = "debug_getBadBlocks")] async fn bad_blocks(&self) -> Result>; } diff --git a/crates/net/rpc-api/src/engine.rs b/crates/net/rpc-api/src/engine.rs index 53385f1e6..d7f7b28a6 100644 --- a/crates/net/rpc-api/src/engine.rs +++ b/crates/net/rpc-api/src/engine.rs @@ -1,14 +1,11 @@ use jsonrpsee::{core::RpcResult as Result, proc_macros::rpc}; -use reth_primitives::{BlockId, Bytes, H256, H64}; -use reth_rpc_types::{ - engine::{ - ExecutionPayload, ForkchoiceState, ForkchoiceUpdated, PayloadAttributes, PayloadStatus, - TransitionConfiguration, - }, - RichBlock, +use reth_primitives::H64; +use reth_rpc_types::engine::{ + ExecutionPayload, ForkchoiceState, ForkchoiceUpdated, PayloadAttributes, PayloadStatus, + TransitionConfiguration, }; -#[rpc(client)] +#[rpc(server)] pub trait EngineApi { /// See also #[method(name = "engine_newPayloadV1")] diff --git a/crates/net/rpc-api/src/eth.rs b/crates/net/rpc-api/src/eth.rs index d5fa2ba54..3e84de20c 100644 --- a/crates/net/rpc-api/src/eth.rs +++ b/crates/net/rpc-api/src/eth.rs @@ -3,8 +3,8 @@ use jsonrpsee::{ proc_macros::rpc, }; use reth_primitives::{ - transaction, transaction::eip2930::AccessListWithGasUsed, Address, BlockId, BlockNumber, Bytes, - H256, H64, U256, U64, + transaction::eip2930::AccessListWithGasUsed, Address, BlockId, BlockNumber, Bytes, H256, H64, + U256, U64, }; use reth_rpc_types::{ CallRequest, EIP1186AccountProofResponse, FeeHistory, Index, RichBlock, SyncStatus, diff --git a/crates/net/rpc-types/src/eth/engine.rs b/crates/net/rpc-types/src/eth/engine.rs index 89d47ce66..2559f4067 100644 --- a/crates/net/rpc-types/src/eth/engine.rs +++ b/crates/net/rpc-types/src/eth/engine.rs @@ -2,6 +2,7 @@ //! Engine API types: use reth_primitives::{Address, BlockNumber, Bloom, Bytes, H256, H64, U256, U64}; +use serde::{Deserialize, Serialize}; /// This structure maps on the ExecutionPayload structure of the beacon chain spec. #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]