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

Add infinity timeout on Genserver DB call #1622

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion lib/archethic/db/embedded_impl/chain_writer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ defmodule Archethic.DB.EmbeddedImpl.ChainWriter do
@spec append_transaction(binary(), Transaction.t()) :: :ok
def append_transaction(genesis_address, tx = %Transaction{}) do
via_tuple = {:via, PartitionSupervisor, {ChainWriterSupervisor, genesis_address}}
GenServer.call(via_tuple, {:append_tx, genesis_address, tx})
GenServer.call(via_tuple, {:append_tx, genesis_address, tx}, :infinity)
end

@doc """
Expand Down
6 changes: 3 additions & 3 deletions lib/archethic/utxo/loader.ex
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ defmodule Archethic.UTXO.Loader do
def add_utxo(utxo = %VersionedUnspentOutput{}, genesis_address) do
genesis_address
|> via_tuple()
|> GenServer.call({:add_utxo, utxo, genesis_address})
|> GenServer.call({:add_utxo, utxo, genesis_address}, :infinity)
end

@doc """
Expand All @@ -39,7 +39,7 @@ defmodule Archethic.UTXO.Loader do
def add_utxos(utxos, genesis_address) do
genesis_address
|> via_tuple()
|> GenServer.call({:add_utxos, utxos, genesis_address})
|> GenServer.call({:add_utxos, utxos, genesis_address}, :infinity)
end

@doc """
Expand All @@ -59,7 +59,7 @@ defmodule Archethic.UTXO.Loader do
def consume_inputs(tx = %Transaction{}, genesis_address) do
genesis_address
|> via_tuple()
|> GenServer.call({:consume_inputs, tx, genesis_address})
|> GenServer.call({:consume_inputs, tx, genesis_address}, :infinity)
end

defp via_tuple(genesis_address) do
Expand Down
Loading