From 6925f0c34ebf0b6e82e05e3a67f80fadefc20721 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Fri, 8 Feb 2019 17:36:38 +0300 Subject: [PATCH 1/2] add index for address_current_token_balances --- ...ken_contract_address_hash_for_current_token_balance.exs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 apps/explorer/priv/repo/migrations/20190208143201_add_index_on_address_hash_block_number_and_token_contract_address_hash_for_current_token_balance.exs diff --git a/apps/explorer/priv/repo/migrations/20190208143201_add_index_on_address_hash_block_number_and_token_contract_address_hash_for_current_token_balance.exs b/apps/explorer/priv/repo/migrations/20190208143201_add_index_on_address_hash_block_number_and_token_contract_address_hash_for_current_token_balance.exs new file mode 100644 index 0000000000..ba85766756 --- /dev/null +++ b/apps/explorer/priv/repo/migrations/20190208143201_add_index_on_address_hash_block_number_and_token_contract_address_hash_for_current_token_balance.exs @@ -0,0 +1,7 @@ +defmodule Explorer.Repo.Migrations.AddIndexOnAddressHashBlockNumberAndTokenContractAddressHashForCurrentTokenBalance do + use Ecto.Migration + + def change do + create(index(:address_current_token_balances, [:address_hash, :block_number, :token_contract_address_hash])) + end +end From 537006d029f30421b0195dcccdd86ed8df84cada Mon Sep 17 00:00:00 2001 From: Brian McMichael Date: Fri, 8 Feb 2019 13:52:06 -0500 Subject: [PATCH 2/2] Optionally configure cert paths via envvar --- apps/block_scout_web/config/dev.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/block_scout_web/config/dev.exs b/apps/block_scout_web/config/dev.exs index 8feafba7cb..ae05490a86 100644 --- a/apps/block_scout_web/config/dev.exs +++ b/apps/block_scout_web/config/dev.exs @@ -11,8 +11,8 @@ config :block_scout_web, BlockScoutWeb.Endpoint, https: [ port: 4001, cipher_suite: :strong, - certfile: "priv/cert/selfsigned.pem", - keyfile: "priv/cert/selfsigned_key.pem" + certfile: System.get_env("CERTFILE") || "priv/cert/selfsigned.pem", + keyfile: System.get_env("KEYFILE") || "priv/cert/selfsigned_key.pem" ], debug_errors: true, code_reloader: true,