allow nil to be passed to drop_nonconsensus

pull/2768/head
pasqu4le 5 years ago
parent f04052c4c4
commit d031294d04
No known key found for this signature in database
GPG Key ID: 8F3EE01F1DC90687
  1. 2
      apps/explorer/lib/explorer/chain/cache/blocks.ex

@ -21,7 +21,7 @@ defmodule Explorer.Chain.Cache.Blocks do
def element_to_id(%Block{number: number}), do: number
def drop_nonconsensus([]), do: :ok
def drop_nonconsensus(numbers) when is_nil(numbers) or numbers == [], do: :ok
def drop_nonconsensus(numbers) when is_list(numbers) do
ConCache.update(cache_name(), ids_list_key(), fn ids ->

Loading…
Cancel
Save