Skip to content

Commit

Permalink
Logger trigger slot creation only when authorized
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmanzanera committed Sep 12, 2022
1 parent dc14b22 commit 20f8d60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/archethic/beacon_chain/slot_timer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ defmodule Archethic.BeaconChain.SlotTimer do

slot_time = DateTime.utc_now() |> DateTime.truncate(:millisecond)

Logger.debug("Trigger beacon slots creation at #{Utils.time_to_string(slot_time)}")
PubSub.notify_current_epoch_of_slot_timer(slot_time)

case Crypto.first_node_public_key() |> P2P.get_node_info() |> elem(1) do
%Node{authorized?: true, available?: true} ->
Logger.debug("Trigger beacon slots creation at #{Utils.time_to_string(slot_time)}")
Enum.each(list_subset_processes(), &send(&1, {:create_slot, slot_time}))

_ ->
Expand Down

0 comments on commit 20f8d60

Please sign in to comment.