pull/2255/head
Ayrat Badykov 5 years ago
parent 2af8cd8f25
commit 0a13e0225b
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 4
      apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/rolling_window.ex

@ -211,6 +211,9 @@ defmodule EthereumJSONRPC.RollingWindow do
"""
@spec inspect(table :: atom, key :: term()) :: nonempty_list(non_neg_integer)
def inspect(table, key) do
if :ets.whereis(table) == :undefined do
[]
else
case :ets.lookup(table, key) do
[{_, current_window, windows}] ->
[current_window | windows]
@ -219,4 +222,5 @@ defmodule EthereumJSONRPC.RollingWindow do
[]
end
end
end
end

Loading…
Cancel
Save