fix(rpc): use actual configured limit in trace_filter (#22477)

This commit is contained in:
MergeBot
2026-02-23 14:14:19 +01:00
committed by GitHub
parent 949111c953
commit 6d718d0c21

View File

@@ -367,9 +367,10 @@ where
// ensure that the range is not too large, since we need to fetch all blocks in the range
let distance = end.saturating_sub(start);
if distance > self.inner.eth_config.max_trace_filter_blocks {
return Err(EthApiError::InvalidParams(
"Block range too large; currently limited to 100 blocks".to_string(),
)
return Err(EthApiError::InvalidParams(format!(
"Block range too large; currently limited to {} blocks",
self.inner.eth_config.max_trace_filter_blocks
))
.into())
}