fix CR issue

pull/2255/head
Ayrat Badykov 5 years ago
parent 7628b90060
commit d54021cbfb
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 10
      apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/rolling_window.ex

@ -209,12 +209,14 @@ defmodule EthereumJSONRPC.RollingWindow do
@doc """
Display the raw contents of all windows for a given key.
"""
@spec inspect(table :: atom, key :: term()) :: nonempty_list(non_neg_integer)
@spec inspect(table :: atom, key :: term()) :: nonempty_list(non_neg_integer) || []
def inspect(table, key) do
if :ets.whereis(table) == :undefined do
case :ets.whereis(table) do
:undefined ->
[]
else
case :ets.lookup(table, key) do
tid ->
case :ets.lookup(tid, key) do
[{_, current_window, windows}] ->
[current_window | windows]

Loading…
Cancel
Save