@@ -24,12 +24,12 @@ defmodule LambdaEthereumConsensus.Beacon.BeaconNode do
24
24
25
25
Cache . initialize_cache ( )
26
26
27
+ libp2p_args = get_libp2p_args ( )
28
+
27
29
time = :os . system_time ( :second )
28
30
29
31
ForkChoice . init_store ( store , time )
30
32
31
- libp2p_args = get_libp2p_args ( store . genesis_time )
32
-
33
33
validator_manager =
34
34
get_validator_manager (
35
35
deposit_tree_snapshot ,
@@ -39,8 +39,8 @@ defmodule LambdaEthereumConsensus.Beacon.BeaconNode do
39
39
40
40
children =
41
41
[
42
- { LambdaEthereumConsensus.Libp2pPort , libp2p_args } ,
43
42
{ LambdaEthereumConsensus.Beacon.Ticker , [ LambdaEthereumConsensus.Libp2pPort ] } ,
43
+ { LambdaEthereumConsensus.Libp2pPort , [ { :genesis_time , store . genesis_time } | libp2p_args ] } ,
44
44
{ Task.Supervisor , name: PruneStatesSupervisor } ,
45
45
{ Task.Supervisor , name: PruneBlocksSupervisor } ,
46
46
{ Task.Supervisor , name: PruneBlobsSupervisor }
@@ -63,7 +63,7 @@ defmodule LambdaEthereumConsensus.Beacon.BeaconNode do
63
63
]
64
64
end
65
65
66
- defp get_libp2p_args ( genesis_time ) do
66
+ defp get_libp2p_args ( ) do
67
67
config = Application . fetch_env! ( :lambda_ethereum_consensus , :libp2p )
68
68
port = Keyword . fetch! ( config , :port )
69
69
bootnodes = Keyword . fetch! ( config , :bootnodes )
@@ -75,7 +75,6 @@ defmodule LambdaEthereumConsensus.Beacon.BeaconNode do
75
75
end
76
76
77
77
[
78
- genesis_time: genesis_time ,
79
78
listen_addr: listen_addr ,
80
79
enable_discovery: true ,
81
80
discovery_addr: "0.0.0.0:#{ port } " ,
0 commit comments