Skip to content

Commit

Permalink
Improve logs of SC that do not produce a next transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
bchamagne authored and Neylix committed May 4, 2023
1 parent 860881d commit 804fded
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/archethic/contracts/worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ defmodule Archethic.Contracts.Worker do
:ok <- handle_new_transaction(next_tx) do
Logger.debug("Contract execution success", meta)
else
{:ok, nil} ->
Logger.debug("Contract execution success but there is no new transaction", meta)

_ ->
Logger.debug("Contract execution failed", meta)
end
Expand All @@ -126,6 +129,9 @@ defmodule Archethic.Contracts.Worker do
:ok <- handle_new_transaction(next_tx) do
Logger.debug("Contract execution success", meta)
else
{:ok, nil} ->
Logger.debug("Contract execution success but there is no new transaction", meta)

_ ->
Logger.debug("Contract execution failed", meta)
end
Expand All @@ -152,6 +158,9 @@ defmodule Archethic.Contracts.Worker do
:ok <- handle_new_transaction(next_tx) do
Logger.debug("Contract execution success", meta)
else
{:ok, nil} ->
Logger.debug("Contract execution success but there is no new transaction", meta)

_ ->
Logger.debug("Contract execution failed", meta)
end
Expand Down Expand Up @@ -180,6 +189,9 @@ defmodule Archethic.Contracts.Worker do
:ok <- handle_new_transaction(next_tx) do
Logger.debug("Contract execution success", meta)
else
{:ok, nil} ->
Logger.debug("Contract execution success but there is no new transaction", meta)

_ ->
Logger.debug("Contract execution failed", meta)
end
Expand Down

0 comments on commit 804fded

Please sign in to comment.