chore(rpc): only forward calls to upstream if against latest block state

This commit is contained in:
Quertyy
2025-07-07 02:20:52 +02:00
parent 0c640ab2f2
commit d0d7ab8cb8
2 changed files with 75 additions and 32 deletions

View File

@ -45,7 +45,11 @@ fn main() -> eyre::Result<()> {
if ext.forward_call {
ctx.modules.replace_configured(
call_forwarder::CallForwarderExt::new(upstream_rpc_url.clone()).into_rpc(),
call_forwarder::CallForwarderExt::new(
upstream_rpc_url.clone(),
ctx.registry.eth_api().clone(),
)
.into_rpc(),
)?;
info!("Call/gas estimation will be forwarded to {}", upstream_rpc_url);
}