fix(rpc): change debug_set_head number parameter to U64 (#21678)

Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Matthias Seitz
2026-02-01 19:59:22 +01:00
committed by GitHub
parent 9f8c22e2c3
commit 7e18aa4be8
2 changed files with 4 additions and 4 deletions

View File

@@ -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<TxReq: RpcObject> {
/// 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")]

View File

@@ -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(())
}