Skip to content

Commit

Permalink
Add infinity timeout on Genserver DB call
Browse files Browse the repository at this point in the history
  • Loading branch information
Neylix committed Dec 17, 2024
1 parent 43c2264 commit 05dcfa5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 05dcfa5

Please sign in to comment.