From 3dcf91d38f90d25abd7062109fd5b9cd25061772 Mon Sep 17 00:00:00 2001 From: Viktor Baranov Date: Thu, 29 Sep 2022 18:14:27 +0400 Subject: [PATCH] Fix runtime definition of ETHEREUM_JSONRPC_VARIANT variable --- CHANGELOG.md | 2 +- apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/variant.ex | 2 +- config/runtime.exs | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fe0dbea36..4b0be27b5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ ### Chore - [#6183](https://github.com/blockscout/blockscout/pull/6183) - Transparent coin name definition -- [#6155](https://github.com/blockscout/blockscout/pull/6155) - Refactor Ethereum JSON RPC variants +- [#6155](https://github.com/blockscout/blockscout/pull/6155), [#6189](https://github.com/blockscout/blockscout/pull/6189) - Refactor Ethereum JSON RPC variants - [#6125](https://github.com/blockscout/blockscout/pull/6125) - Rename obsolete "parity" EthereumJSONRPC.Variant to "nethermind" - [#6124](https://github.com/blockscout/blockscout/pull/6124) - Docker compose: add config for Erigon - [#6053](https://github.com/blockscout/blockscout/pull/6053) - Bump jest-environment-jsdom from 29.0.1 to 29.0.2 in /apps/block_scout_web/assets diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/variant.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/variant.ex index 4027609b42..2468636538 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/variant.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/variant.ex @@ -96,7 +96,7 @@ defmodule EthereumJSONRPC.Variant do ) :: {:ok, [raw_trace_params]} | {:error, reason :: term} | :ignore def get do - variant = Application.get_env(:ethereum_jsonrpc, __MODULE__)[:type] + variant = System.get_env("ETHEREUM_JSONRPC_VARIANT", "nethermind") cond do is_nil(variant) -> diff --git a/config/runtime.exs b/config/runtime.exs index 48fcfdf9dd..080870947f 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -168,8 +168,6 @@ config :ethereum_jsonrpc, EthereumJSONRPC.Geth, debug_trace_transaction_timeout: config :ethereum_jsonrpc, EthereumJSONRPC.PendingTransaction, type: System.get_env("ETHEREUM_JSONRPC_PENDING_TRANSACTIONS_TYPE", "default") -config :ethereum_jsonrpc, EthereumJSONRPC.Variant, type: System.get_env("ETHEREUM_JSONRPC_VARIANT", "nethermind") - ################ ### Explorer ### ################