From 4122680833ffab0d6cb5bb0dcf35ff091b5cd940 Mon Sep 17 00:00:00 2001 From: Aliaksei Misiukevich Date: Wed, 14 May 2025 09:55:53 +0200 Subject: [PATCH] feat: impl of bad_blocks handler (#16209) Signed-off-by: Aliaksei Misiukevich Co-authored-by: Matthias Seitz --- crates/rpc/rpc-builder/tests/it/http.rs | 2 +- crates/rpc/rpc/src/debug.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/rpc/rpc-builder/tests/it/http.rs b/crates/rpc/rpc-builder/tests/it/http.rs index a038285ea1..507858c7f9 100644 --- a/crates/rpc/rpc-builder/tests/it/http.rs +++ b/crates/rpc/rpc-builder/tests/it/http.rs @@ -368,7 +368,7 @@ where DebugApiClient::raw_block(client, block_id).await.unwrap_err(); DebugApiClient::raw_transaction(client, B256::default()).await.unwrap(); DebugApiClient::raw_receipts(client, block_id).await.unwrap(); - assert!(is_unimplemented(DebugApiClient::bad_blocks(client).await.err().unwrap())); + DebugApiClient::bad_blocks(client).await.unwrap(); } async fn test_basic_net_calls(client: &C) diff --git a/crates/rpc/rpc/src/debug.rs b/crates/rpc/rpc/src/debug.rs index 400182bd2b..a44ba2a6b1 100644 --- a/crates/rpc/rpc/src/debug.rs +++ b/crates/rpc/rpc/src/debug.rs @@ -940,7 +940,7 @@ where /// Handler for `debug_getBadBlocks` async fn bad_blocks(&self) -> RpcResult> { - Err(internal_rpc_err("unimplemented")) + Ok(vec![]) } /// Handler for `debug_traceChain`