|
|
|
@ -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 |
|
|
|
|