diff --git a/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/transaction_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/transaction_controller_test.exs index 913849e8ca..0ecd2fd52a 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/transaction_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/transaction_controller_test.exs @@ -736,6 +736,9 @@ defmodule BlockScoutWeb.API.RPC.TransactionControllerTest do "txhash" => "#{transaction.hash}" } + init_config = Application.get_env(:ethereum_jsonrpc, EthereumJSONRPC.Geth) + Application.put_env(:ethereum_jsonrpc, EthereumJSONRPC.Geth, tracer: "call_tracer", debug_trace_timeout: "5s") + assert response = conn |> get("/api", params) @@ -744,6 +747,8 @@ defmodule BlockScoutWeb.API.RPC.TransactionControllerTest do assert response["result"]["revertReason"] == hex_reason assert response["status"] == "1" assert response["message"] == "OK" + + Application.put_env(:ethereum_jsonrpc, EthereumJSONRPC.Geth, init_config) end end @@ -836,6 +841,9 @@ defmodule BlockScoutWeb.API.RPC.TransactionControllerTest do "txhash" => "#{transaction.hash}" } + init_config = Application.get_env(:ethereum_jsonrpc, EthereumJSONRPC.Geth) + Application.put_env(:ethereum_jsonrpc, EthereumJSONRPC.Geth, tracer: "call_tracer", debug_trace_timeout: "5s") + assert response = conn |> get("/api", params) @@ -844,6 +852,8 @@ defmodule BlockScoutWeb.API.RPC.TransactionControllerTest do assert response["result"]["revertReason"] in ["", "0x"] assert response["status"] == "1" assert response["message"] == "OK" + + Application.put_env(:ethereum_jsonrpc, EthereumJSONRPC.Geth, init_config) end defp resolve_schema(result \\ %{}) do diff --git a/apps/block_scout_web/test/block_scout_web/views/transaction_view_test.exs b/apps/block_scout_web/test/block_scout_web/views/transaction_view_test.exs index a28f2b579e..ea53a2a970 100644 --- a/apps/block_scout_web/test/block_scout_web/views/transaction_view_test.exs +++ b/apps/block_scout_web/test/block_scout_web/views/transaction_view_test.exs @@ -366,6 +366,9 @@ defmodule BlockScoutWeb.TransactionViewTest do end ) + init_config = Application.get_env(:ethereum_jsonrpc, EthereumJSONRPC.Geth) + Application.put_env(:ethereum_jsonrpc, EthereumJSONRPC.Geth, tracer: "call_tracer", debug_trace_timeout: "5s") + revert_reason = TransactionView.transaction_revert_reason(transaction, nil) assert revert_reason == @@ -373,6 +376,8 @@ defmodule BlockScoutWeb.TransactionViewTest do [ {"reason", "string", "UniswapV2Router: INSUFFICIENT_OUTPUT_AMOUNT"} ]} + + Application.put_env(:ethereum_jsonrpc, EthereumJSONRPC.Geth, init_config) end end end diff --git a/apps/explorer/test/explorer/chain_test.exs b/apps/explorer/test/explorer/chain_test.exs index a57dac010c..7ec3a65922 100644 --- a/apps/explorer/test/explorer/chain_test.exs +++ b/apps/explorer/test/explorer/chain_test.exs @@ -4324,6 +4324,9 @@ defmodule Explorer.ChainTest do end ) + init_config = Application.get_env(:ethereum_jsonrpc, EthereumJSONRPC.Geth) + Application.put_env(:ethereum_jsonrpc, EthereumJSONRPC.Geth, tracer: "call_tracer", debug_trace_timeout: "5s") + assert Chain.transaction_to_revert_reason(transaction) == hex_reason assert Transaction.decoded_revert_reason(transaction, hex_reason) == { @@ -4332,6 +4335,8 @@ defmodule Explorer.ChainTest do "Error(string reason)", [{"reason", "string", "No credit of that type"}] } + + Application.put_env(:ethereum_jsonrpc, EthereumJSONRPC.Geth, init_config) end end