From d031294d04a14029f397620090dfe23bae6712d7 Mon Sep 17 00:00:00 2001 From: pasqu4le Date: Wed, 9 Oct 2019 14:35:20 +0200 Subject: [PATCH] allow nil to be passed to drop_nonconsensus --- apps/explorer/lib/explorer/chain/cache/blocks.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/explorer/lib/explorer/chain/cache/blocks.ex b/apps/explorer/lib/explorer/chain/cache/blocks.ex index 11b75a4d09..ca968fb56d 100644 --- a/apps/explorer/lib/explorer/chain/cache/blocks.ex +++ b/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 ->