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

Fix withdrawals sum count on empty database #7553

Merged
merged 1 commit into from
May 26, 2023

Conversation

sl1depengwyn
Copy link
Collaborator

@sl1depengwyn sl1depengwyn commented May 25, 2023

Motivation

2023-05-25T17:34:07.299 [error] GenServer Explorer.Chain.Cache.WithdrawalsSum terminating
** (FunctionClauseError) no function clause matching in Explorer.Chain.Wei.to/2
    (explorer 5.1.5) lib/explorer/chain/wei.ex:251: Explorer.Chain.Wei.to(nil, :wei)
    (explorer 5.1.5) lib/explorer/chain/cache/withdrawals_sum.ex:72: Explorer.Chain.Cache.WithdrawalsSum.consolidate/0
    (explorer 5.1.5) lib/explorer/chain/cache/withdrawals_sum.ex:38: Explorer.Chain.Cache.WithdrawalsSum.handle_continue/2
    (stdlib 5.0) gen_server.erl:1067: :gen_server.try_handle_continue/3
    (stdlib 5.0) gen_server.erl:977: :gen_server.loop/7
    (stdlib 5.0) proc_lib.erl:241: :proc_lib.init_p_do_apply/3
Last message: {:continue, :ok}
State: %{consolidate?: true}

Changelog

Add handling of nil response from aggregate query

Checklist for your Pull Request (PR)

@sl1depengwyn sl1depengwyn force-pushed the mf-fix-withdrawals-sum-counter branch from a25df12 to 20ca946 Compare May 25, 2023 14:52
@sl1depengwyn sl1depengwyn marked this pull request as ready for review May 25, 2023 14:52
@sl1depengwyn sl1depengwyn force-pushed the mf-fix-withdrawals-sum-counter branch from 20ca946 to 4eff389 Compare May 25, 2023 14:54
@vbaranov vbaranov merged commit dcd52a7 into master May 26, 2023
15 checks passed
@vbaranov vbaranov deleted the mf-fix-withdrawals-sum-counter branch May 26, 2023 08:41
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

2 participants