Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "set OMG.State GenServer timeout to 10s" #1672

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions apps/omg/lib/omg/state.ex
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ defmodule OMG.State do

@type exec_error :: Validator.can_process_tx_error()

@timeout 10_000

### Client

@doc """
Expand All @@ -67,7 +65,7 @@ defmodule OMG.State do
{:ok, {Transaction.tx_hash(), pos_integer, non_neg_integer}}
| {:error, exec_error()}
def exec(tx, input_fees) do
GenServer.call(__MODULE__, {:exec, tx, input_fees}, @timeout)
GenServer.call(__MODULE__, {:exec, tx, input_fees})
end

@doc """
Expand All @@ -80,7 +78,7 @@ defmodule OMG.State do
"""
@spec close_block() :: {:ok, list(Core.db_update())}
def close_block() do
GenServer.call(__MODULE__, :close_block, @timeout)
GenServer.call(__MODULE__, :close_block)
end

@doc """
Expand All @@ -104,7 +102,7 @@ defmodule OMG.State do
def deposit([]), do: {:ok, []}

def deposit(deposits) do
GenServer.call(__MODULE__, {:deposit, deposits}, @timeout)
GenServer.call(__MODULE__, {:deposit, deposits})
end

@doc """
Expand All @@ -121,15 +119,15 @@ defmodule OMG.State do
def exit_utxos([]), do: {:ok, [], {[], []}}

def exit_utxos(exiting_utxo_triggers) do
GenServer.call(__MODULE__, {:exit_utxos, exiting_utxo_triggers}, @timeout)
GenServer.call(__MODULE__, {:exit_utxos, exiting_utxo_triggers})
end

@doc """
Provides a peek into the UTXO set to check if particular output exist (have not been spent)
"""
@spec utxo_exists?(Utxo.Position.t()) :: boolean()
def utxo_exists?(utxo) do
GenServer.call(__MODULE__, {:utxo_exists, utxo}, @timeout)
GenServer.call(__MODULE__, {:utxo_exists, utxo})
end

@doc """
Expand All @@ -140,7 +138,7 @@ defmodule OMG.State do
"""
@spec get_status() :: {non_neg_integer(), boolean()}
def get_status() do
GenServer.call(__MODULE__, :get_status, @timeout)
GenServer.call(__MODULE__, :get_status)
end

### Server
Expand Down