From 7e18aa4be8453cdcc35a5e3cfcea00477831574d Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sun, 1 Feb 2026 19:59:22 +0100 Subject: [PATCH] fix(rpc): change debug_set_head number parameter to U64 (#21678) Co-authored-by: Amp --- crates/rpc/rpc-api/src/debug.rs | 4 ++-- crates/rpc/rpc/src/debug.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/rpc/rpc-api/src/debug.rs b/crates/rpc/rpc-api/src/debug.rs index a8960d4524..0a9c0c266f 100644 --- a/crates/rpc/rpc-api/src/debug.rs +++ b/crates/rpc/rpc-api/src/debug.rs @@ -2,7 +2,7 @@ use alloy_eip7928::BlockAccessList; use alloy_eips::{BlockId, BlockNumberOrTag}; use alloy_genesis::ChainConfig; use alloy_json_rpc::RpcObject; -use alloy_primitives::{Address, Bytes, B256}; +use alloy_primitives::{Address, Bytes, B256, U64}; use alloy_rpc_types_debug::ExecutionWitness; use alloy_rpc_types_eth::{Bundle, StateContext}; use alloy_rpc_types_trace::geth::{ @@ -325,7 +325,7 @@ pub trait DebugApi { /// Sets the current head of the local chain by block number. Note, this is a destructive action /// and may severely damage your chain. Use with extreme caution. #[method(name = "setHead")] - async fn debug_set_head(&self, number: u64) -> RpcResult<()>; + async fn debug_set_head(&self, number: U64) -> RpcResult<()>; /// Sets the rate of mutex profiling. #[method(name = "setMutexProfileFraction")] diff --git a/crates/rpc/rpc/src/debug.rs b/crates/rpc/rpc/src/debug.rs index 7c3d488933..74231b4b14 100644 --- a/crates/rpc/rpc/src/debug.rs +++ b/crates/rpc/rpc/src/debug.rs @@ -3,7 +3,7 @@ use alloy_eip7928::BlockAccessList; use alloy_eips::{eip2718::Encodable2718, BlockId, BlockNumberOrTag}; use alloy_evm::env::BlockEnvironment; use alloy_genesis::ChainConfig; -use alloy_primitives::{hex::decode, uint, Address, Bytes, B256}; +use alloy_primitives::{hex::decode, uint, Address, Bytes, B256, U64}; use alloy_rlp::{Decodable, Encodable}; use alloy_rpc_types::BlockTransactionsKind; use alloy_rpc_types_debug::ExecutionWitness; @@ -998,7 +998,7 @@ where Ok(()) } - async fn debug_set_head(&self, _number: u64) -> RpcResult<()> { + async fn debug_set_head(&self, _number: U64) -> RpcResult<()> { Ok(()) }