From 48be1cc2ab6427d6c96d2c4d0838ec43ddcaa1a4 Mon Sep 17 00:00:00 2001 From: Vid Kersic Date: Mon, 26 Aug 2024 14:28:57 +0200 Subject: [PATCH] chore: remove usage of RichBlock --- crates/consensus/debug-client/src/client.rs | 14 +- crates/consensus/debug-client/src/lib.rs | 2 +- .../debug-client/src/providers/etherscan.rs | 13 +- .../debug-client/src/providers/rpc.rs | 13 +- crates/rpc/rpc-api/src/debug.rs | 4 +- crates/rpc/rpc-builder/tests/it/http.rs | 144 ++++++++---------- crates/rpc/rpc-builder/tests/it/middleware.rs | 4 +- crates/rpc/rpc-testing-util/src/debug.rs | 4 +- crates/rpc/rpc-testing-util/tests/it/trace.rs | 4 +- crates/rpc/rpc/src/debug.rs | 4 +- 10 files changed, 90 insertions(+), 116 deletions(-) diff --git a/crates/consensus/debug-client/src/client.rs b/crates/consensus/debug-client/src/client.rs index 0532b52d1512..a6ffca6d8694 100644 --- a/crates/consensus/debug-client/src/client.rs +++ b/crates/consensus/debug-client/src/client.rs @@ -3,7 +3,7 @@ use alloy_eips::eip2718::Encodable2718; use reth_node_api::EngineTypes; use reth_node_core::{ primitives::B256, - rpc::types::{BlockTransactions, ExecutionPayloadV2, ExecutionPayloadV3, RichBlock}, + rpc::types::{Block, BlockTransactions, ExecutionPayloadV2, ExecutionPayloadV3}, }; use reth_rpc_builder::auth::AuthServerHandle; use reth_rpc_types::ExecutionPayloadV1; @@ -19,10 +19,10 @@ pub trait BlockProvider: Send + Sync + 'static { /// Runs a block provider to send new blocks to the given sender. /// /// Note: This is expected to be spawned in a separate task. - fn subscribe_blocks(&self, tx: mpsc::Sender) -> impl Future + Send; + fn subscribe_blocks(&self, tx: mpsc::Sender) -> impl Future + Send; /// Get a past block by number. - fn get_block(&self, block_number: u64) -> impl Future> + Send; + fn get_block(&self, block_number: u64) -> impl Future> + Send; /// Get previous block hash using previous block hash buffer. If it isn't available (buffer /// started more recently than `offset`), fetch it using `get_block`. @@ -78,7 +78,7 @@ impl DebugConsensusClient

{ let mut previous_block_hashes = AllocRingBuffer::new(64); let mut block_stream = { - let (tx, rx) = mpsc::channel::(64); + let (tx, rx) = mpsc::channel::(64); let block_provider = self.block_provider.clone(); tokio::spawn(async move { block_provider.subscribe_blocks(tx).await; @@ -87,7 +87,7 @@ impl DebugConsensusClient

{ }; while let Some(block) = block_stream.recv().await { - let payload = rich_block_to_execution_payload_v3(block); + let payload = block_to_execution_payload_v3(block); let block_hash = payload.block_hash(); let block_number = payload.block_number(); @@ -170,9 +170,9 @@ impl ExecutionNewPayload { } } -/// Convert a rich block from RPC / Etherscan to params for an execution client's "new payload" +/// Convert a block from RPC / Etherscan to params for an execution client's "new payload" /// method. Assumes that the block contains full transactions. -pub fn rich_block_to_execution_payload_v3(block: RichBlock) -> ExecutionNewPayload { +pub fn block_to_execution_payload_v3(block: Block) -> ExecutionNewPayload { let transactions = match &block.transactions { BlockTransactions::Full(txs) => txs.clone(), // Empty array gets deserialized as BlockTransactions::Hashes. diff --git a/crates/consensus/debug-client/src/lib.rs b/crates/consensus/debug-client/src/lib.rs index 274c895f83d2..e4fa5f44a878 100644 --- a/crates/consensus/debug-client/src/lib.rs +++ b/crates/consensus/debug-client/src/lib.rs @@ -15,5 +15,5 @@ mod client; mod providers; -pub use client::{rich_block_to_execution_payload_v3, BlockProvider, DebugConsensusClient}; +pub use client::{block_to_execution_payload_v3, BlockProvider, DebugConsensusClient}; pub use providers::{EtherscanBlockProvider, RpcBlockProvider}; diff --git a/crates/consensus/debug-client/src/providers/etherscan.rs b/crates/consensus/debug-client/src/providers/etherscan.rs index 238a0ef082b9..f1401d2bc060 100644 --- a/crates/consensus/debug-client/src/providers/etherscan.rs +++ b/crates/consensus/debug-client/src/providers/etherscan.rs @@ -1,7 +1,7 @@ use crate::BlockProvider; use alloy_eips::BlockNumberOrTag; use reqwest::Client; -use reth_node_core::rpc::types::RichBlock; +use reth_node_core::rpc::types::Block; use reth_tracing::tracing::warn; use serde::Deserialize; use std::time::Duration; @@ -31,10 +31,7 @@ impl EtherscanBlockProvider { /// Load block using Etherscan API. Note: only `BlockNumberOrTag::Latest`, /// `BlockNumberOrTag::Earliest`, `BlockNumberOrTag::Pending`, `BlockNumberOrTag::Number(u64)` /// are supported. - pub async fn load_block( - &self, - block_number_or_tag: BlockNumberOrTag, - ) -> eyre::Result { + pub async fn load_block(&self, block_number_or_tag: BlockNumberOrTag) -> eyre::Result { let block: EtherscanBlockResponse = self .http_client .get(&self.base_url) @@ -54,7 +51,7 @@ impl EtherscanBlockProvider { } impl BlockProvider for EtherscanBlockProvider { - async fn subscribe_blocks(&self, tx: mpsc::Sender) { + async fn subscribe_blocks(&self, tx: mpsc::Sender) { let mut last_block_number: Option = None; let mut interval = interval(self.interval); loop { @@ -80,12 +77,12 @@ impl BlockProvider for EtherscanBlockProvider { } } - async fn get_block(&self, block_number: u64) -> eyre::Result { + async fn get_block(&self, block_number: u64) -> eyre::Result { self.load_block(BlockNumberOrTag::Number(block_number)).await } } #[derive(Deserialize, Debug)] struct EtherscanBlockResponse { - result: RichBlock, + result: Block, } diff --git a/crates/consensus/debug-client/src/providers/rpc.rs b/crates/consensus/debug-client/src/providers/rpc.rs index 3c0dcf9992e7..aa203172e240 100644 --- a/crates/consensus/debug-client/src/providers/rpc.rs +++ b/crates/consensus/debug-client/src/providers/rpc.rs @@ -2,7 +2,7 @@ use crate::BlockProvider; use alloy_eips::BlockNumberOrTag; use alloy_provider::{Provider, ProviderBuilder}; use futures::StreamExt; -use reth_node_core::rpc::types::RichBlock; +use reth_node_core::rpc::types::Block; use reth_rpc_types::BlockTransactionsKind; use tokio::sync::mpsc::Sender; @@ -20,7 +20,7 @@ impl RpcBlockProvider { } impl BlockProvider for RpcBlockProvider { - async fn subscribe_blocks(&self, tx: Sender) { + async fn subscribe_blocks(&self, tx: Sender) { let ws_provider = ProviderBuilder::new() .on_builtin(&self.ws_rpc_url) .await @@ -37,23 +37,22 @@ impl BlockProvider for RpcBlockProvider { .await .expect("failed to get block") .expect("block not found"); - if tx.send(full_block.into()).await.is_err() { + if tx.send(full_block).await.is_err() { // channel closed break; } } } - async fn get_block(&self, block_number: u64) -> eyre::Result { + async fn get_block(&self, block_number: u64) -> eyre::Result { let ws_provider = ProviderBuilder::new() .on_builtin(&self.ws_rpc_url) .await .expect("failed to create WS provider"); - let block: RichBlock = ws_provider + let block: Block = ws_provider .get_block_by_number(BlockNumberOrTag::Number(block_number), true) .await? - .ok_or_else(|| eyre::eyre!("block not found by number {}", block_number))? - .into(); + .ok_or_else(|| eyre::eyre!("block not found by number {}", block_number))?; Ok(block) } } diff --git a/crates/rpc/rpc-api/src/debug.rs b/crates/rpc/rpc-api/src/debug.rs index 0364b2c3e6cd..ab755b258314 100644 --- a/crates/rpc/rpc-api/src/debug.rs +++ b/crates/rpc/rpc-api/src/debug.rs @@ -5,7 +5,7 @@ use reth_rpc_types::{ BlockTraceResult, GethDebugTracingCallOptions, GethDebugTracingOptions, GethTrace, TraceResult, }, - Bundle, RichBlock, StateContext, TransactionRequest, + Block, Bundle, StateContext, TransactionRequest, }; use std::collections::HashMap; @@ -37,7 +37,7 @@ pub trait DebugApi { /// Returns an array of recent bad blocks that the client has seen on the network. #[method(name = "getBadBlocks")] - async fn bad_blocks(&self) -> RpcResult>; + async fn bad_blocks(&self) -> RpcResult>; /// Returns the structured logs created during the execution of EVM between two blocks /// (excluding start) as a JSON object. diff --git a/crates/rpc/rpc-builder/tests/it/http.rs b/crates/rpc/rpc-builder/tests/it/http.rs index 2b65bc19a8db..8e9c7ce60835 100644 --- a/crates/rpc/rpc-builder/tests/it/http.rs +++ b/crates/rpc/rpc-builder/tests/it/http.rs @@ -22,8 +22,8 @@ use reth_rpc_api::{ }; use reth_rpc_server_types::RethRpcModule; use reth_rpc_types::{ - trace::filter::TraceFilter, FeeHistory, Filter, Index, Log, PendingTransactionFilterKind, - RichBlock, SyncStatus, Transaction, TransactionReceipt, TransactionRequest, + trace::filter::TraceFilter, Block, FeeHistory, Filter, Index, Log, + PendingTransactionFilterKind, SyncStatus, Transaction, TransactionReceipt, TransactionRequest, }; use serde::{de::DeserializeOwned, Deserialize, Serialize}; use serde_json::Value; @@ -173,77 +173,68 @@ where .unwrap(); // Implemented - EthApiClient::::protocol_version(client).await.unwrap(); - EthApiClient::::chain_id(client).await.unwrap(); - EthApiClient::::accounts(client).await.unwrap(); - EthApiClient::::get_account(client, address, block_number.into()) + EthApiClient::::protocol_version(client).await.unwrap(); + EthApiClient::::chain_id(client).await.unwrap(); + EthApiClient::::accounts(client).await.unwrap(); + EthApiClient::::get_account(client, address, block_number.into()) .await .unwrap(); - EthApiClient::::block_number(client).await.unwrap(); - EthApiClient::::get_code(client, address, None).await.unwrap(); - EthApiClient::::send_raw_transaction(client, tx).await.unwrap(); - EthApiClient::::fee_history(client, U64::from(0), block_number, None) + EthApiClient::::block_number(client).await.unwrap(); + EthApiClient::::get_code(client, address, None).await.unwrap(); + EthApiClient::::send_raw_transaction(client, tx).await.unwrap(); + EthApiClient::::fee_history(client, U64::from(0), block_number, None) .await .unwrap(); - EthApiClient::::balance(client, address, None).await.unwrap(); - EthApiClient::::transaction_count(client, address, None).await.unwrap(); - EthApiClient::::storage_at( - client, - address, - U256::default().into(), - None, - ) - .await - .unwrap(); - EthApiClient::::block_by_hash(client, hash, false).await.unwrap(); - EthApiClient::::block_by_number(client, block_number, false) + EthApiClient::::balance(client, address, None).await.unwrap(); + EthApiClient::::transaction_count(client, address, None).await.unwrap(); + EthApiClient::::storage_at(client, address, U256::default().into(), None) .await .unwrap(); - EthApiClient::::block_transaction_count_by_number(client, block_number) + EthApiClient::::block_by_hash(client, hash, false).await.unwrap(); + EthApiClient::::block_by_number(client, block_number, false).await.unwrap(); + EthApiClient::::block_transaction_count_by_number(client, block_number) .await .unwrap(); - EthApiClient::::block_transaction_count_by_hash(client, hash) + EthApiClient::::block_transaction_count_by_hash(client, hash) .await .unwrap(); - EthApiClient::::block_uncles_count_by_hash(client, hash).await.unwrap(); - EthApiClient::::block_uncles_count_by_number(client, block_number) + EthApiClient::::block_uncles_count_by_hash(client, hash).await.unwrap(); + EthApiClient::::block_uncles_count_by_number(client, block_number) .await .unwrap(); - EthApiClient::::uncle_by_block_hash_and_index(client, hash, index) + EthApiClient::::uncle_by_block_hash_and_index(client, hash, index) .await .unwrap(); - EthApiClient::::uncle_by_block_number_and_index( + EthApiClient::::uncle_by_block_number_and_index( client, block_number, index, ) .await .unwrap(); - EthApiClient::::sign(client, address, bytes.clone()).await.unwrap_err(); - EthApiClient::::sign_typed_data(client, address, typed_data) + EthApiClient::::sign(client, address, bytes.clone()).await.unwrap_err(); + EthApiClient::::sign_typed_data(client, address, typed_data) .await .unwrap_err(); - EthApiClient::::transaction_by_hash(client, tx_hash).await.unwrap(); - EthApiClient::::transaction_by_block_hash_and_index( - client, hash, index, - ) - .await - .unwrap(); - EthApiClient::::transaction_by_block_number_and_index( + EthApiClient::::transaction_by_hash(client, tx_hash).await.unwrap(); + EthApiClient::::transaction_by_block_hash_and_index(client, hash, index) + .await + .unwrap(); + EthApiClient::::transaction_by_block_number_and_index( client, block_number, index, ) .await .unwrap(); - EthApiClient::::create_access_list( + EthApiClient::::create_access_list( client, call_request.clone(), Some(block_number.into()), ) .await .unwrap(); - EthApiClient::::estimate_gas( + EthApiClient::::estimate_gas( client, call_request.clone(), Some(block_number.into()), @@ -251,7 +242,7 @@ where ) .await .unwrap(); - EthApiClient::::call( + EthApiClient::::call( client, call_request.clone(), Some(block_number.into()), @@ -260,34 +251,30 @@ where ) .await .unwrap(); - EthApiClient::::syncing(client).await.unwrap(); - EthApiClient::::send_transaction(client, transaction_request) + EthApiClient::::syncing(client).await.unwrap(); + EthApiClient::::send_transaction(client, transaction_request) .await .unwrap_err(); - EthApiClient::::hashrate(client).await.unwrap(); - EthApiClient::::submit_hashrate( - client, - U256::default(), - B256::default(), - ) - .await - .unwrap(); - EthApiClient::::gas_price(client).await.unwrap_err(); - EthApiClient::::max_priority_fee_per_gas(client).await.unwrap_err(); - EthApiClient::::get_proof(client, address, vec![], None).await.unwrap(); + EthApiClient::::hashrate(client).await.unwrap(); + EthApiClient::::submit_hashrate(client, U256::default(), B256::default()) + .await + .unwrap(); + EthApiClient::::gas_price(client).await.unwrap_err(); + EthApiClient::::max_priority_fee_per_gas(client).await.unwrap_err(); + EthApiClient::::get_proof(client, address, vec![], None).await.unwrap(); // Unimplemented assert!(is_unimplemented( - EthApiClient::::author(client).await.err().unwrap() + EthApiClient::::author(client).await.err().unwrap() )); assert!(is_unimplemented( - EthApiClient::::is_mining(client).await.err().unwrap() + EthApiClient::::is_mining(client).await.err().unwrap() )); assert!(is_unimplemented( - EthApiClient::::get_work(client).await.err().unwrap() + EthApiClient::::get_work(client).await.err().unwrap() )); assert!(is_unimplemented( - EthApiClient::::submit_work( + EthApiClient::::submit_work( client, B64::default(), B256::default(), @@ -298,7 +285,7 @@ where .unwrap() )); assert!(is_unimplemented( - EthApiClient::::sign_transaction(client, call_request.clone()) + EthApiClient::::sign_transaction(client, call_request.clone()) .await .err() .unwrap() @@ -643,7 +630,7 @@ async fn test_eth_get_block_by_number_rpc_call() { let client = handle.http_client().unwrap(); // Requesting block by number with proper fields - test_rpc_call_ok::>( + test_rpc_call_ok::>( &client, "eth_getBlockByNumber", rpc_params!["0x1b4", true], // Block number and full transaction object flag @@ -651,7 +638,7 @@ async fn test_eth_get_block_by_number_rpc_call() { .await; // Requesting block by number with wrong fields - test_rpc_call_err::>( + test_rpc_call_err::>( &client, "eth_getBlockByNumber", rpc_params!["0x1b4", "0x1b4"], @@ -659,8 +646,7 @@ async fn test_eth_get_block_by_number_rpc_call() { .await; // Requesting block by number with missing fields - test_rpc_call_err::>(&client, "eth_getBlockByNumber", rpc_params!["0x1b4"]) - .await; + test_rpc_call_err::>(&client, "eth_getBlockByNumber", rpc_params!["0x1b4"]).await; } #[tokio::test(flavor = "multi_thread")] @@ -672,7 +658,7 @@ async fn test_eth_get_block_by_hash_rpc_call() { let client = handle.http_client().unwrap(); // Requesting block by hash with proper fields - test_rpc_call_ok::>( + test_rpc_call_ok::>( &client, "eth_getBlockByHash", rpc_params!["0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae", false], @@ -680,7 +666,7 @@ async fn test_eth_get_block_by_hash_rpc_call() { .await; // Requesting block by hash with wrong fields - test_rpc_call_err::>( + test_rpc_call_err::>( &client, "eth_getBlockByHash", rpc_params!["0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae", "0x1b4"], @@ -688,7 +674,7 @@ async fn test_eth_get_block_by_hash_rpc_call() { .await; // Requesting block by hash with missing fields - test_rpc_call_err::>( + test_rpc_call_err::>( &client, "eth_getBlockByHash", rpc_params!["0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae"], @@ -1072,7 +1058,7 @@ async fn test_eth_get_uncle_by_block_hash_and_index_rpc_call() { let client = handle.http_client().unwrap(); // Requesting uncle by block hash and index with proper fields - test_rpc_call_ok::>( + test_rpc_call_ok::>( &client, "eth_getUncleByBlockHashAndIndex", rpc_params!["0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", "0x0"], @@ -1080,7 +1066,7 @@ async fn test_eth_get_uncle_by_block_hash_and_index_rpc_call() { .await; // Requesting uncle by block hash and index with additional fields - test_rpc_call_ok::>( + test_rpc_call_ok::>( &client, "eth_getUncleByBlockHashAndIndex", rpc_params![ @@ -1092,15 +1078,11 @@ async fn test_eth_get_uncle_by_block_hash_and_index_rpc_call() { .await; // Requesting uncle by block hash and index with missing fields - test_rpc_call_err::>( - &client, - "eth_getUncleByBlockHashAndIndex", - rpc_params![], - ) - .await; + test_rpc_call_err::>(&client, "eth_getUncleByBlockHashAndIndex", rpc_params![]) + .await; // Requesting uncle by block hash and index with wrong fields - test_rpc_call_err::>( + test_rpc_call_err::>( &client, "eth_getUncleByBlockHashAndIndex", rpc_params![true], @@ -1117,7 +1099,7 @@ async fn test_eth_get_uncle_by_block_number_and_index_rpc_call() { let client = handle.http_client().unwrap(); // Requesting uncle by block number and index with proper fields - test_rpc_call_ok::>( + test_rpc_call_ok::>( &client, "eth_getUncleByBlockNumberAndIndex", rpc_params!["0x29c", "0x0"], @@ -1125,7 +1107,7 @@ async fn test_eth_get_uncle_by_block_number_and_index_rpc_call() { .await; // Requesting uncle by block number and index with additional fields - test_rpc_call_ok::>( + test_rpc_call_ok::>( &client, "eth_getUncleByBlockNumberAndIndex", rpc_params!["0x29c", "0x0", true], @@ -1133,15 +1115,11 @@ async fn test_eth_get_uncle_by_block_number_and_index_rpc_call() { .await; // Requesting uncle by block number and index with missing fields - test_rpc_call_err::>( - &client, - "eth_getUncleByBlockNumberAndIndex", - rpc_params![], - ) - .await; + test_rpc_call_err::>(&client, "eth_getUncleByBlockNumberAndIndex", rpc_params![]) + .await; // Requesting uncle by block number and index with wrong fields - test_rpc_call_err::>( + test_rpc_call_err::>( &client, "eth_getUncleByBlockNumberAndIndex", rpc_params![true], diff --git a/crates/rpc/rpc-builder/tests/it/middleware.rs b/crates/rpc/rpc-builder/tests/it/middleware.rs index 6641157e9f35..6ef6c7f67797 100644 --- a/crates/rpc/rpc-builder/tests/it/middleware.rs +++ b/crates/rpc/rpc-builder/tests/it/middleware.rs @@ -8,7 +8,7 @@ use reth_rpc::EthApi; use reth_rpc_builder::{RpcServerConfig, TransportRpcModuleConfig}; use reth_rpc_eth_api::EthApiClient; use reth_rpc_server_types::RpcModuleSelection; -use reth_rpc_types::{RichBlock, Transaction}; +use reth_rpc_types::{Block, Transaction}; use std::{ future::Future, pin::Pin, @@ -75,7 +75,7 @@ async fn test_rpc_middleware() { .unwrap(); let client = handle.http_client().unwrap(); - EthApiClient::::protocol_version(&client).await.unwrap(); + EthApiClient::::protocol_version(&client).await.unwrap(); let count = mylayer.count.load(Ordering::Relaxed); assert_eq!(count, 1); } diff --git a/crates/rpc/rpc-testing-util/src/debug.rs b/crates/rpc/rpc-testing-util/src/debug.rs index 532e9555f8ba..5bb003dac8e7 100644 --- a/crates/rpc/rpc-testing-util/src/debug.rs +++ b/crates/rpc/rpc-testing-util/src/debug.rs @@ -15,7 +15,7 @@ use reth_rpc_types::{ common::TraceResult, geth::{GethDebugTracerType, GethDebugTracingOptions, GethTrace}, }, - RichBlock, Transaction, TransactionRequest, + Block, Transaction, TransactionRequest, }; const NOOP_TRACER: &str = include_str!("../assets/noop-tracer.js"); @@ -77,7 +77,7 @@ pub trait DebugApiExt { impl DebugApiExt for T where - T: EthApiClient + DebugApiClient + Sync, + T: EthApiClient + DebugApiClient + Sync, { type Provider = T; diff --git a/crates/rpc/rpc-testing-util/tests/it/trace.rs b/crates/rpc/rpc-testing-util/tests/it/trace.rs index 4d1234e1ae26..619c1ed43374 100644 --- a/crates/rpc/rpc-testing-util/tests/it/trace.rs +++ b/crates/rpc/rpc-testing-util/tests/it/trace.rs @@ -7,7 +7,7 @@ use reth_rpc_api_testing_util::{debug::DebugApiExt, trace::TraceApiExt, utils::p use reth_rpc_eth_api::EthApiClient; use reth_rpc_types::{ trace::{filter::TraceFilter, parity::TraceType, tracerequest::TraceCallRequest}, - RichBlock, Transaction, + Block, Transaction, }; /// This is intended to be run locally against a running node. @@ -110,7 +110,7 @@ async fn debug_trace_block_entire_chain() { let client = HttpClientBuilder::default().build(url).unwrap(); let current_block: u64 = - >::block_number(&client) + >::block_number(&client) .await .unwrap() .try_into() diff --git a/crates/rpc/rpc/src/debug.rs b/crates/rpc/rpc/src/debug.rs index b259f1fd1fbb..9c5ed7f95951 100644 --- a/crates/rpc/rpc/src/debug.rs +++ b/crates/rpc/rpc/src/debug.rs @@ -24,7 +24,7 @@ use reth_rpc_types::{ BlockTraceResult, FourByteFrame, GethDebugBuiltInTracerType, GethDebugTracerType, GethDebugTracingCallOptions, GethDebugTracingOptions, GethTrace, NoopFrame, TraceResult, }, - BlockError, Bundle, RichBlock, StateContext, TransactionRequest, + Block as RpcBlock, BlockError, Bundle, StateContext, TransactionRequest, }; use reth_tasks::pool::BlockingTaskGuard; use reth_trie::{HashedPostState, HashedStorage}; @@ -864,7 +864,7 @@ where } /// Handler for `debug_getBadBlocks` - async fn bad_blocks(&self) -> RpcResult> { + async fn bad_blocks(&self) -> RpcResult> { Err(internal_rpc_err("unimplemented")) }