diff --git a/web3_proxy/src/block_number.rs b/web3_proxy/src/block_number.rs index 423480f7..cf689a11 100644 --- a/web3_proxy/src/block_number.rs +++ b/web3_proxy/src/block_number.rs @@ -255,6 +255,16 @@ impl CacheMode { }); } + if let Some(params) = params.as_array() { + if params.is_empty() { + // no params given. cache with the head block + return Ok(Self::Cache { + block: head_block.into(), + cache_errors: true, + }); + } + } + match method { "net_listening" => Ok(CacheMode::CacheSuccessForever), "net_version" => Ok(CacheMode::CacheSuccessForever),