Skip to content

Commit 9985081

Browse files
committed
Remove unneded diffs
1 parent b8623ee commit 9985081

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

lib/lambda_ethereum_consensus/beacon/beacon_node.ex

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ defmodule LambdaEthereumConsensus.Beacon.BeaconNode do
2424

2525
Cache.initialize_cache()
2626

27+
libp2p_args = get_libp2p_args()
28+
2729
time = :os.system_time(:second)
2830

2931
ForkChoice.init_store(store, time)
3032

31-
libp2p_args = get_libp2p_args(store.genesis_time)
32-
3333
validator_manager =
3434
get_validator_manager(
3535
deposit_tree_snapshot,
@@ -39,8 +39,8 @@ defmodule LambdaEthereumConsensus.Beacon.BeaconNode do
3939

4040
children =
4141
[
42-
{LambdaEthereumConsensus.Libp2pPort, libp2p_args},
4342
{LambdaEthereumConsensus.Beacon.Ticker, [LambdaEthereumConsensus.Libp2pPort]},
43+
{LambdaEthereumConsensus.Libp2pPort, [{:genesis_time, store.genesis_time} | libp2p_args]},
4444
{Task.Supervisor, name: PruneStatesSupervisor},
4545
{Task.Supervisor, name: PruneBlocksSupervisor},
4646
{Task.Supervisor, name: PruneBlobsSupervisor}
@@ -63,7 +63,7 @@ defmodule LambdaEthereumConsensus.Beacon.BeaconNode do
6363
]
6464
end
6565

66-
defp get_libp2p_args(genesis_time) do
66+
defp get_libp2p_args() do
6767
config = Application.fetch_env!(:lambda_ethereum_consensus, :libp2p)
6868
port = Keyword.fetch!(config, :port)
6969
bootnodes = Keyword.fetch!(config, :bootnodes)
@@ -75,7 +75,6 @@ defmodule LambdaEthereumConsensus.Beacon.BeaconNode do
7575
end
7676

7777
[
78-
genesis_time: genesis_time,
7978
listen_addr: listen_addr,
8079
enable_discovery: true,
8180
discovery_addr: "0.0.0.0:#{port}",

lib/libp2p_port.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ defmodule LambdaEthereumConsensus.Libp2pPort do
379379
{:ok,
380380
%{
381381
genesis_time: genesis_time,
382-
slot_data: {0, :first_third},
382+
slot_data: nil,
383383
port: port,
384384
subscribers: %{},
385385
requests: Requests.new(),
@@ -399,7 +399,7 @@ defmodule LambdaEthereumConsensus.Libp2pPort do
399399
end
400400

401401
@impl GenServer
402-
def handle_cast({:on_tick, time}, %{genesis_time: genesis_time} = state) when time <= genesis_time, do: {:noreply, state}
402+
def handle_cast({:on_tick, time}, %{genesis_time: genesis_time} = state) when time < genesis_time, do: {:noreply, state}
403403
def handle_cast({:on_tick, time}, %{genesis_time: genesis_time, slot_data: slot_data} = state) do
404404
# TODO: we probably want to remove this from here, but we keep it here to have this serialized
405405
# with respect to the other fork choice store modifications.

0 commit comments

Comments
 (0)