|
|
|
@ -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`. |
|
|
|
|