Merge branch 'master' into vb-fix-checksu-in-address-counters-request

pull/3033/head
Victor Baranov 5 years ago committed by GitHub
commit fb8531e759
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 7
      apps/explorer/lib/explorer/chain.ex

@ -28,6 +28,7 @@
- [#2883](https://github.com/poanetwork/blockscout/pull/2883) - Fix long contracts names
### Chore
- [#3032](https://github.com/poanetwork/blockscout/pull/3032) - Remove indexing status alert for Ganache variant
- [#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

@ -846,6 +846,12 @@ defmodule Explorer.Chain do
"""
@spec finished_indexing?() :: boolean()
def finished_indexing? do
json_rpc_named_arguments = Application.fetch_env!(:indexer, :json_rpc_named_arguments)
variant = Keyword.fetch!(json_rpc_named_arguments, :variant)
if variant == EthereumJSONRPC.Ganache do
true
else
with {:transactions_exist, true} <- {:transactions_exist, Repo.exists?(Transaction)},
min_block_number when not is_nil(min_block_number) <- Repo.aggregate(Transaction, :min, :block_number) do
query =
@ -862,6 +868,7 @@ defmodule Explorer.Chain do
nil -> false
end
end
end
@doc """
The `t:Explorer.Chain.Transaction.t/0` `gas_price` of the `transaction` in `unit`.

Loading…
Cancel
Save