fix dialyzer

pull/2901/head
Ayrat Badykov 5 years ago
parent 6f8a738735
commit 6ea58c93b0
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 6
      apps/explorer/lib/explorer/chain/cache/address_sum.ex
  2. 2
      apps/explorer/test/explorer/chain/cache/address_sum_test.exs

@ -18,7 +18,11 @@ defmodule Explorer.Chain.Cache.AddressSum do
defp handle_fallback(:sum) do
result = fetch_from_db()
{:update, result}
if Application.get_env(:explorer, __MODULE__)[:enabled] do
{:update, result}
else
{:return, result}
end
end
defp fetch_from_db do

@ -12,7 +12,7 @@ defmodule Explorer.Chain.Cache.AddressSumTest do
test "returns default address sum" do
result = AddressSum.get_sum()
assert is_nil(result)
assert result == 0
end
test "updates cache if initial value is zero" do

Loading…
Cancel
Save