File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed
lib/lambda_ethereum_consensus Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ defmodule LambdaEthereumConsensus.Beacon.StoreSetup do
38
38
end
39
39
40
40
@ doc """
41
- Gets a { store, genesis_validators_root} tuple with the configured strategy.
41
+ Gets a store with the configured strategy.
42
42
"""
43
43
@ spec setup! ( ) :: Store . t ( )
44
44
def setup! ( ) , do: setup! ( get_strategy! ( ) )
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ defmodule LambdaEthereumConsensus.Beacon.SyncBlocks do
8
8
alias LambdaEthereumConsensus.ForkChoice
9
9
alias LambdaEthereumConsensus.Libp2pPort
10
10
alias LambdaEthereumConsensus.P2P.BlockDownloader
11
- alias LambdaEthereumConsensus.StateTransition.Misc
12
11
13
12
@ blocks_per_chunk 16
14
13
@ retries 50
@@ -23,9 +22,8 @@ defmodule LambdaEthereumConsensus.Beacon.SyncBlocks do
23
22
"""
24
23
@ spec run ( ) :: non_neg_integer ( )
25
24
def run ( ) do
26
- # Initial sleep for faster app start
27
- checkpoint = ForkChoice . get_finalized_checkpoint ( )
28
- initial_slot = Misc . compute_start_slot_at_epoch ( checkpoint . epoch ) + 1
25
+ % { head_slot: head_slot } = ForkChoice . get_current_status_message ( )
26
+ initial_slot = head_slot + 1
29
27
last_slot = ForkChoice . get_current_chain_slot ( )
30
28
31
29
# If we're around genesis, we consider ourselves synced
Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ defmodule LambdaEthereumConsensus.ForkChoice do
176
176
Logger . info ( "Pruning states before slot #{ new_finalized_epoch } " )
177
177
178
178
new_finalized_slot =
179
- new_finalized_epoch * ChainSpec . get ( "SLOTS_PER_EPOCH" )
179
+ Misc . compute_start_slot_at_epoch ( new_finalized_epoch )
180
180
181
181
Task.Supervisor . start_child (
182
182
PruneStatesSupervisor ,
You can’t perform that action at this time.
0 commit comments