From 2352158b3dc60cf8f7ce8522984fd57669d38b98 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 29 Jan 2026 01:35:19 +0100 Subject: [PATCH] fix(reth-bench): return error instead of panic on invalid payload (#21557) Co-authored-by: Amp --- bin/reth-bench/src/valid_payload.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/reth-bench/src/valid_payload.rs b/bin/reth-bench/src/valid_payload.rs index 3680211fdc..2f4e89503d 100644 --- a/bin/reth-bench/src/valid_payload.rs +++ b/bin/reth-bench/src/valid_payload.rs @@ -260,7 +260,9 @@ pub(crate) async fn call_new_payload>( while !status.is_valid() { if status.is_invalid() { error!(?status, ?params, "Invalid {method}",); - panic!("Invalid {method}: {status:?}"); + return Err(alloy_json_rpc::RpcError::LocalUsageError(Box::new(std::io::Error::other( + format!("Invalid {method}: {status:?}"), + )))) } if status.is_syncing() { return Err(alloy_json_rpc::RpcError::UnsupportedFeature(