Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add last_block_number=0 for empty node and db #2799

Merged
merged 3 commits into from
Oct 23, 2019
Merged

Conversation

ayrat555
Copy link
Contributor

Motivation

fixes

** (FunctionClauseError) no function clause matching in Indexer.Block.Catchup.BoundIntervalSupervisor.handle_info/2
    (indexer) lib/indexer/block/catchup/bound_interval_supervisor.ex:181: Indexer.Block.Catchup.BoundIntervalSupervisor.handle_info({#Reference<0.1083520497.830210051.41795>, %{first_block_number: 0, missing_block_count: 0, shrunk: false}}, %Indexer.Block.Catchup.BoundIntervalSupervisor{bound_interval: %Indexer.BoundInterval{current: 2500, maximum: 25000, minimum: 2500}, fetcher: %Indexer.Block.Catchup.Fetcher{block_fetcher: %Indexer.Block.Fetcher{broadcast: :catchup, callback_module: Indexer.Block.Catchup.Fetcher, json_rpc_named_arguments: [transport: EthereumJSONRPC.HTTP, transport_options: [http: EthereumJSONRPC.HTTP.HTTPoison, url: "http://localhost:7545", http_options: [recv_timeout: 60000, timeout: 60000, hackney: [pool: :ethereum_jsonrpc]]], variant: EthereumJSONRPC.Ganache], receipts_batch_size: 250, receipts_concurrency: 10}, blocks_batch_size: 10, blocks_concurrency: 10, memory_monitor: Indexer.Memory.Monitor}, memory_monitor: nil, task: %Task{owner: #PID<0.1072.0>, pid: #PID<0.1073.0>, ref: #Reference<0.1083520497.830210051.41795>}})
    (stdlib) gen_server.erl:637: :gen_server.try_dispatch/4
    (stdlib) gen_server.erl:711: :gen_server.handle_msg/6
    (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: {#Reference<0.1083520497.830210051.41795>, %{first_block_number: 0, missing_block_count: 0, shrunk: false}}
State: %Indexer.Block.Catchup.BoundIntervalSupervisor{bound_interval: %Indexer.BoundInterval{current: 2500, maximum: 25000, minimum: 2500}, fetcher: %Indexer.Block.Catchup.Fetcher{block_fetcher: %Indexer.Block.Fetcher{broadcast: :catchup, callback_module: Indexer.Block.Catchup.Fetcher, json_rpc_named_arguments: [transport: EthereumJSONRPC.HTTP, transport_options: [http: EthereumJSONRPC.HTTP.HTTPoison, url: "http://localhost:7545", http_options: [recv_timeout: 60000, timeout: 60000, hackney: [pool: :ethereum_jsonrpc]]], variant: EthereumJSONRPC.Ganache], receipts_batch_size: 250, receipts_concurrency: 10}, blocks_batch_size: 10, blocks_concurrency: 10, memory_monitor: Indexer.Memory.Monitor}, memory_monitor: nil, task: %Task{owner: #PID<0.1072.0>, pid: #PID<0.1073.0>, ref: #Reference<0.1083520497.830210051.41795>}}

Changelog

  • add last_block_number=0 for empty node and db

@coveralls
Copy link

coveralls commented Oct 23, 2019

Pull Request Test Coverage Report for Build 5a5cfe10-f419-489c-87fc-6b48fe47c118

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 76.762%

Changes Missing Coverage Covered Lines Changed/Added Lines %
apps/indexer/lib/indexer/block/catchup/fetcher.ex 0 1 0.0%
Totals Coverage Status
Change from base Build c046cd9f-d338-4db2-ae9c-99c150937a2a: 0.0%
Covered Lines: 5282
Relevant Lines: 6881

💛 - Coveralls

Copy link
Member

@vbaranov vbaranov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully tested with Ganache-cli.

@vbaranov vbaranov merged commit bfb8fd0 into master Oct 23, 2019
@vbaranov vbaranov deleted the ab-fix-empty-node-bug branch October 23, 2019 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants