learn to cache more
This commit is contained in:
parent
9bd18250fe
commit
54341c4654
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -7242,7 +7242,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "web3_proxy"
|
name = "web3_proxy"
|
||||||
version = "1.42.6"
|
version = "1.42.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
@ -7323,7 +7323,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "web3_proxy_cli"
|
name = "web3_proxy_cli"
|
||||||
version = "1.42.6"
|
version = "1.42.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"env_logger",
|
"env_logger",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "web3_proxy"
|
name = "web3_proxy"
|
||||||
version = "1.42.6"
|
version = "1.42.7"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
@ -210,7 +210,9 @@ fn get_block_param_id(method: &str) -> Option<usize> {
|
|||||||
"eth_getTransactionCount" => Some(1),
|
"eth_getTransactionCount" => Some(1),
|
||||||
"eth_getUncleByBlockNumberAndIndex" => Some(0),
|
"eth_getUncleByBlockNumberAndIndex" => Some(0),
|
||||||
"eth_getUncleCountByBlockNumber" => Some(0),
|
"eth_getUncleCountByBlockNumber" => Some(0),
|
||||||
|
"trace_block" => Some(0),
|
||||||
"trace_call" => Some(2),
|
"trace_call" => Some(2),
|
||||||
|
"trace_callMany" => Some(1),
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -266,8 +268,10 @@ impl CacheMode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
match method {
|
match method {
|
||||||
"net_listening" => Ok(CacheMode::CacheSuccessForever),
|
"debug_traceTransaction" => {
|
||||||
"net_version" => Ok(CacheMode::CacheSuccessForever),
|
// TODO: make sure re-orgs work properly!
|
||||||
|
Ok(CacheMode::CacheSuccessForever)
|
||||||
|
}
|
||||||
"eth_gasPrice" => Ok(CacheMode::Cache {
|
"eth_gasPrice" => Ok(CacheMode::Cache {
|
||||||
block: head_block.into(),
|
block: head_block.into(),
|
||||||
cache_errors: false,
|
cache_errors: false,
|
||||||
@ -393,6 +397,8 @@ impl CacheMode {
|
|||||||
cache_errors: false,
|
cache_errors: false,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
"net_listening" => Ok(CacheMode::CacheSuccessForever),
|
||||||
|
"net_version" => Ok(CacheMode::CacheSuccessForever),
|
||||||
method => match get_block_param_id(method) {
|
method => match get_block_param_id(method) {
|
||||||
Some(block_param_id) => {
|
Some(block_param_id) => {
|
||||||
let block =
|
let block =
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "web3_proxy_cli"
|
name = "web3_proxy_cli"
|
||||||
version = "1.42.6"
|
version = "1.42.7"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
default-run = "web3_proxy_cli"
|
default-run = "web3_proxy_cli"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user