exit early when empty params array
This commit is contained in:
parent
b742a25729
commit
70d75d5acb
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user