Skip to content

Commit a8e5349

Browse files
ethereum: Replace 'geth' naming with a more generic 'rpc'
Signed-off-by: Maksim Dimitrov <dimitrov.maksim@gmail.com>
1 parent 2b4675a commit a8e5349

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

chain/ethereum/src/call_helper.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ const RPC_EXECUTION_ERRORS: &[&str] = &[
5959
"invalidfeopcode",
6060
];
6161

62-
/// Helper that checks if a geth style RPC error message corresponds to a revert.
62+
/// Helper that checks if a RPC error message corresponds to a revert.
6363
fn is_rpc_revert_message(message: &str) -> bool {
64-
let env_geth_call_errors = ENV_VARS.geth_eth_call_errors.iter();
64+
let env_rpc_call_errors = ENV_VARS.rpc_eth_call_errors.iter();
6565
let mut execution_errors = RPC_EXECUTION_ERRORS
6666
.iter()
6767
.copied()
68-
.chain(env_geth_call_errors.map(|s| s.as_str()));
68+
.chain(env_rpc_call_errors.map(|s| s.as_str()));
6969
execution_errors.any(|e| message.to_lowercase().contains(e))
7070
}
7171

chain/ethereum/src/env.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ lazy_static! {
1313
pub struct EnvVars {
1414
/// Additional deterministic errors that have not yet been hardcoded.
1515
///
16-
/// Set by the environment variable `GRAPH_GETH_ETH_CALL_ERRORS`, separated
16+
/// Set by the environment variable `GRAPH_RPC_ETH_CALL_ERRORS`, separated
1717
/// by `;`.
18-
pub geth_eth_call_errors: Vec<String>,
18+
pub rpc_eth_call_errors: Vec<String>,
1919
/// Set by the environment variable `GRAPH_ETH_GET_LOGS_MAX_CONTRACTS`. The
2020
/// default value is 2000.
2121
pub get_logs_max_contracts: usize,
@@ -114,8 +114,8 @@ impl From<Inner> for EnvVars {
114114
fn from(x: Inner) -> Self {
115115
Self {
116116
get_logs_max_contracts: x.get_logs_max_contracts,
117-
geth_eth_call_errors: x
118-
.geth_eth_call_errors
117+
rpc_eth_call_errors: x
118+
.rpc_eth_call_errors
119119
.split(';')
120120
.filter(|s| !s.is_empty())
121121
.map(str::to_string)
@@ -158,8 +158,8 @@ impl Default for EnvVars {
158158

159159
#[derive(Clone, Debug, Envconfig)]
160160
struct Inner {
161-
#[envconfig(from = "GRAPH_GETH_ETH_CALL_ERRORS", default = "")]
162-
geth_eth_call_errors: String,
161+
#[envconfig(from = "GRAPH_RPC_ETH_CALL_ERRORS", default = "")]
162+
rpc_eth_call_errors: String,
163163
#[envconfig(from = "GRAPH_ETH_GET_LOGS_MAX_CONTRACTS", default = "2000")]
164164
get_logs_max_contracts: usize,
165165

0 commit comments

Comments
 (0)