Skip to content

Commit

Permalink
Fix notification of new transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel committed Feb 25, 2022
1 parent 0f60f0e commit 71fb5e1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
15 changes: 0 additions & 15 deletions lib/archethic/pub_sub.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ defmodule ArchEthic.PubSub do
alias ArchEthic.PubSubRegistry

alias ArchEthic.TransactionChain.Transaction
alias ArchEthic.TransactionChain.TransactionSummary

@doc """
Notify the registered processes than a new transaction has been validated
Expand Down Expand Up @@ -73,13 +72,6 @@ defmodule ArchEthic.PubSub do
dispatch(:next_summary_time, {:next_summary_time, date})
end

@doc """
Notify added new transaction summary in subset to the subscribers
"""
def notify_added_new_transaction_summary(tx_summary = %TransactionSummary{}) do
dispatch(:added_new_transaction_summary, {:added_new_transaction_summary, tx_summary})
end

@doc """
Notify next epoch of slot time
"""
Expand Down Expand Up @@ -162,13 +154,6 @@ defmodule ArchEthic.PubSub do
Registry.register(PubSubRegistry, :next_summary_time, [])
end

@doc """
Register a process to added new transaction summary to beacon chain slot
"""
def register_to_added_new_transaction_summary do
Registry.register(PubSubRegistry, :added_new_transaction_summary, [])
end

@doc """
Register a process to sent current epoch of slot time
"""
Expand Down
2 changes: 1 addition & 1 deletion lib/archethic_web/live/chains/beacon_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ defmodule ArchEthicWeb.BeaconChainLive do
if connected?(socket) do
PubSub.register_to_next_summary_time()
# register for client to able to get the current added transaction to the beacon pool
PubSub.register_to_added_new_transaction_summary()
PubSub.register_to_current_epoch_of_slot_time()
PubSub.register_to_new_replication_attestations()
end

beacon_dates =
Expand Down

0 comments on commit 71fb5e1

Please sign in to comment.