diff --git a/lib/archethic/utils/regression/playbook.ex b/lib/archethic/utils/regression/playbook.ex index 7d0c20486..b26d61a2c 100644 --- a/lib/archethic/utils/regression/playbook.ex +++ b/lib/archethic/utils/regression/playbook.ex @@ -219,7 +219,8 @@ defmodule Archethic.Utils.Regression.Playbook do host, port, curve \\ Crypto.default_curve(), - proto \\ :http + proto \\ :http, + opts \\ [] ) do chain_length = get_chain_size(transaction_seed, curve, host, port, proto) @@ -256,7 +257,10 @@ defmodule Archethic.Utils.Regression.Playbook do proto ) do {:ok, %{"status" => "pending"}} -> - case Task.yield(replication_attestation, 5_000) || Task.shutdown(replication_attestation) do + await_timeout = Keyword.get(opts, :await_timeout, 5_000) + + case Task.yield(replication_attestation, await_timeout) || + Task.shutdown(replication_attestation) do {:ok, :ok} -> {:ok, tx.address}