From 444ea6ac0e6aa64ef6ad799ab8fbb7388b97a99a Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Thu, 27 Feb 2020 14:12:19 +0300 Subject: [PATCH] Remove default websockets URL from config --- CHANGELOG.md | 1 + apps/explorer/config/dev/ganache.exs | 2 +- apps/explorer/config/dev/geth.exs | 2 +- apps/explorer/config/dev/parity.exs | 2 +- apps/explorer/config/dev/rsk.exs | 2 +- apps/explorer/config/prod/ganache.exs | 4 ++-- apps/explorer/config/prod/geth.exs | 4 ++-- apps/indexer/config/dev/ganache.exs | 4 ++-- apps/indexer/config/dev/geth.exs | 2 +- apps/indexer/config/dev/parity.exs | 2 +- apps/indexer/config/dev/rsk.exs | 2 +- apps/indexer/config/prod/ganache.exs | 4 ++-- apps/indexer/config/prod/geth.exs | 2 +- 13 files changed, 17 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9da4ca6a8..bac84187a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ - [#2883](https://github.com/poanetwork/blockscout/pull/2883) - Fix long contracts names ### Chore +- [#3030](https://github.com/poanetwork/blockscout/pull/3030) - Remove default websockets URL from config - [#2995](https://github.com/poanetwork/blockscout/pull/2995) - Support API_PATH env var in Docker file diff --git a/apps/explorer/config/dev/ganache.exs b/apps/explorer/config/dev/ganache.exs index fec954d325..e6c2214601 100644 --- a/apps/explorer/config/dev/ganache.exs +++ b/apps/explorer/config/dev/ganache.exs @@ -14,7 +14,7 @@ config :explorer, transport: EthereumJSONRPC.WebSocket, transport_options: [ web_socket: EthereumJSONRPC.WebSocket.WebSocketClient, - url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "ws://localhost:7545" + url: System.get_env("ETHEREUM_JSONRPC_WS_URL") ], variant: EthereumJSONRPC.Ganache ] diff --git a/apps/explorer/config/dev/geth.exs b/apps/explorer/config/dev/geth.exs index 5d57d1a3f2..00f52e54e6 100644 --- a/apps/explorer/config/dev/geth.exs +++ b/apps/explorer/config/dev/geth.exs @@ -14,7 +14,7 @@ config :explorer, transport: EthereumJSONRPC.WebSocket, transport_options: [ web_socket: EthereumJSONRPC.WebSocket.WebSocketClient, - url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "wss://mainnet.infura.io/8lTvJTKmHPCHazkneJsY/ws" + url: System.get_env("ETHEREUM_JSONRPC_WS_URL") ], variant: EthereumJSONRPC.Geth ] diff --git a/apps/explorer/config/dev/parity.exs b/apps/explorer/config/dev/parity.exs index 7f92c092cc..aebe0dfac1 100644 --- a/apps/explorer/config/dev/parity.exs +++ b/apps/explorer/config/dev/parity.exs @@ -19,7 +19,7 @@ config :explorer, transport: EthereumJSONRPC.WebSocket, transport_options: [ web_socket: EthereumJSONRPC.WebSocket.WebSocketClient, - url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "ws://localhost:8546" + url: System.get_env("ETHEREUM_JSONRPC_WS_URL") ], variant: EthereumJSONRPC.Parity ] diff --git a/apps/explorer/config/dev/rsk.exs b/apps/explorer/config/dev/rsk.exs index 3928520d30..58af2ee8c0 100644 --- a/apps/explorer/config/dev/rsk.exs +++ b/apps/explorer/config/dev/rsk.exs @@ -19,7 +19,7 @@ config :explorer, transport: EthereumJSONRPC.WebSocket, transport_options: [ web_socket: EthereumJSONRPC.WebSocket.WebSocketClient, - url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "ws://localhost:8546" + url: System.get_env("ETHEREUM_JSONRPC_WS_URL") ], variant: EthereumJSONRPC.RSK ] diff --git a/apps/explorer/config/prod/ganache.exs b/apps/explorer/config/prod/ganache.exs index fec954d325..c0a4b98a02 100644 --- a/apps/explorer/config/prod/ganache.exs +++ b/apps/explorer/config/prod/ganache.exs @@ -5,7 +5,7 @@ config :explorer, transport: EthereumJSONRPC.HTTP, transport_options: [ http: EthereumJSONRPC.HTTP.HTTPoison, - url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "http://localhost:7545", + url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL"), http_options: [recv_timeout: :timer.minutes(1), timeout: :timer.minutes(1), hackney: [pool: :ethereum_jsonrpc]] ], variant: EthereumJSONRPC.Ganache @@ -14,7 +14,7 @@ config :explorer, transport: EthereumJSONRPC.WebSocket, transport_options: [ web_socket: EthereumJSONRPC.WebSocket.WebSocketClient, - url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "ws://localhost:7545" + url: System.get_env("ETHEREUM_JSONRPC_WS_URL") ], variant: EthereumJSONRPC.Ganache ] diff --git a/apps/explorer/config/prod/geth.exs b/apps/explorer/config/prod/geth.exs index 5d57d1a3f2..026d745e9b 100644 --- a/apps/explorer/config/prod/geth.exs +++ b/apps/explorer/config/prod/geth.exs @@ -5,7 +5,7 @@ config :explorer, transport: EthereumJSONRPC.HTTP, transport_options: [ http: EthereumJSONRPC.HTTP.HTTPoison, - url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "https://mainnet.infura.io/8lTvJTKmHPCHazkneJsY", + url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL"), http_options: [recv_timeout: :timer.minutes(1), timeout: :timer.minutes(1), hackney: [pool: :ethereum_jsonrpc]] ], variant: EthereumJSONRPC.Geth @@ -14,7 +14,7 @@ config :explorer, transport: EthereumJSONRPC.WebSocket, transport_options: [ web_socket: EthereumJSONRPC.WebSocket.WebSocketClient, - url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "wss://mainnet.infura.io/8lTvJTKmHPCHazkneJsY/ws" + url: System.get_env("ETHEREUM_JSONRPC_WS_URL") ], variant: EthereumJSONRPC.Geth ] diff --git a/apps/indexer/config/dev/ganache.exs b/apps/indexer/config/dev/ganache.exs index e90d242470..ab90c798bd 100644 --- a/apps/indexer/config/dev/ganache.exs +++ b/apps/indexer/config/dev/ganache.exs @@ -16,9 +16,9 @@ config :indexer, variant: EthereumJSONRPC.Ganache ], subscribe_named_arguments: [ - transport: EthereumJSONRPC.WebSocket, + transport: System.get_env("ETHEREUM_JSONRPC_WS_URL") && EthereumJSONRPC.WebSocket, transport_options: [ web_socket: EthereumJSONRPC.WebSocket.WebSocketClient, - url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "ws://localhost:7545" + url: System.get_env("ETHEREUM_JSONRPC_WS_URL") ] ] diff --git a/apps/indexer/config/dev/geth.exs b/apps/indexer/config/dev/geth.exs index fd59ab2eb7..e7c7bb125f 100644 --- a/apps/indexer/config/dev/geth.exs +++ b/apps/indexer/config/dev/geth.exs @@ -19,6 +19,6 @@ config :indexer, transport: EthereumJSONRPC.WebSocket, transport_options: [ web_socket: EthereumJSONRPC.WebSocket.WebSocketClient, - url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "wss://mainnet.infura.io/ws/8lTvJTKmHPCHazkneJsY" + url: System.get_env("ETHEREUM_JSONRPC_WS_URL") ] ] diff --git a/apps/indexer/config/dev/parity.exs b/apps/indexer/config/dev/parity.exs index c58d70f37c..0a99ce6690 100644 --- a/apps/indexer/config/dev/parity.exs +++ b/apps/indexer/config/dev/parity.exs @@ -42,6 +42,6 @@ config :indexer, transport: System.get_env("ETHEREUM_JSONRPC_WS_URL") && EthereumJSONRPC.WebSocket, transport_options: [ web_socket: EthereumJSONRPC.WebSocket.WebSocketClient, - url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "ws://localhost:8546" + url: System.get_env("ETHEREUM_JSONRPC_WS_URL") ] ] diff --git a/apps/indexer/config/dev/rsk.exs b/apps/indexer/config/dev/rsk.exs index 19ecac5b25..ed504f91f6 100644 --- a/apps/indexer/config/dev/rsk.exs +++ b/apps/indexer/config/dev/rsk.exs @@ -26,6 +26,6 @@ config :indexer, transport: System.get_env("ETHEREUM_JSONRPC_WS_URL") && EthereumJSONRPC.WebSocket, transport_options: [ web_socket: EthereumJSONRPC.WebSocket.WebSocketClient, - url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "ws://localhost:8546" + url: System.get_env("ETHEREUM_JSONRPC_WS_URL") ] ] diff --git a/apps/indexer/config/prod/ganache.exs b/apps/indexer/config/prod/ganache.exs index e90d242470..ab90c798bd 100644 --- a/apps/indexer/config/prod/ganache.exs +++ b/apps/indexer/config/prod/ganache.exs @@ -16,9 +16,9 @@ config :indexer, variant: EthereumJSONRPC.Ganache ], subscribe_named_arguments: [ - transport: EthereumJSONRPC.WebSocket, + transport: System.get_env("ETHEREUM_JSONRPC_WS_URL") && EthereumJSONRPC.WebSocket, transport_options: [ web_socket: EthereumJSONRPC.WebSocket.WebSocketClient, - url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "ws://localhost:7545" + url: System.get_env("ETHEREUM_JSONRPC_WS_URL") ] ] diff --git a/apps/indexer/config/prod/geth.exs b/apps/indexer/config/prod/geth.exs index 5e62557fe7..e56abe5105 100644 --- a/apps/indexer/config/prod/geth.exs +++ b/apps/indexer/config/prod/geth.exs @@ -19,6 +19,6 @@ config :indexer, transport: EthereumJSONRPC.WebSocket, transport_options: [ web_socket: EthereumJSONRPC.WebSocket.WebSocketClient, - url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "wss://mainnet.infura.io/ws/8lTvJTKmHPCHazkneJsY" + url: System.get_env("ETHEREUM_JSONRPC_WS_URL") ] ]