|
|
|
@ -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] |
|
|
|
@ -220,3 +223,4 @@ defmodule EthereumJSONRPC.RollingWindow do |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|