|
|
|
@ -9,7 +9,7 @@ defmodule Indexer.Block.FetcherTest do |
|
|
|
|
|
|
|
|
|
alias Explorer.Chain |
|
|
|
|
alias Explorer.Chain.{Address, Log, Transaction, Wei} |
|
|
|
|
alias Indexer.{CoinBalance, BufferedTask, Code, Token, TokenBalance} |
|
|
|
|
alias Indexer.{CoinBalance, BufferedTask, Code, InternalTransaction, Token, TokenBalance} |
|
|
|
|
alias Indexer.Block.{Fetcher, Uncle} |
|
|
|
|
|
|
|
|
|
@moduletag capture_log: true |
|
|
|
@ -42,6 +42,7 @@ defmodule Indexer.Block.FetcherTest do |
|
|
|
|
setup %{json_rpc_named_arguments: json_rpc_named_arguments} do |
|
|
|
|
CoinBalance.Supervisor.Case.start_supervised!(json_rpc_named_arguments: json_rpc_named_arguments) |
|
|
|
|
Code.Supervisor.Case.start_supervised!(json_rpc_named_arguments: json_rpc_named_arguments) |
|
|
|
|
InternalTransaction.Supervisor.Case.start_supervised!(json_rpc_named_arguments: json_rpc_named_arguments) |
|
|
|
|
Token.Supervisor.Case.start_supervised!(json_rpc_named_arguments: json_rpc_named_arguments) |
|
|
|
|
TokenBalance.Supervisor.Case.start_supervised!(json_rpc_named_arguments: json_rpc_named_arguments) |
|
|
|
|
|
|
|
|
@ -222,7 +223,7 @@ defmodule Indexer.Block.FetcherTest do |
|
|
|
|
errors: [] |
|
|
|
|
}} = result |
|
|
|
|
|
|
|
|
|
wait_for_tasks(Code.Fetcher) |
|
|
|
|
wait_for_tasks(InternalTransaction.Fetcher) |
|
|
|
|
wait_for_tasks(CoinBalance.Fetcher) |
|
|
|
|
|
|
|
|
|
assert Repo.aggregate(Chain.Block, :count, :hash) == 1 |
|
|
|
@ -579,7 +580,7 @@ defmodule Indexer.Block.FetcherTest do |
|
|
|
|
errors: [] |
|
|
|
|
}} = Fetcher.fetch_and_import_range(block_fetcher, block_number..block_number) |
|
|
|
|
|
|
|
|
|
wait_for_tasks(Code.Fetcher) |
|
|
|
|
wait_for_tasks(InternalTransaction.Fetcher) |
|
|
|
|
wait_for_tasks(CoinBalance.Fetcher) |
|
|
|
|
|
|
|
|
|
assert Repo.aggregate(Chain.Block, :count, :hash) == 1 |
|
|
|
|