File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
lib/lambda_ethereum_consensus/beacon Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -170,15 +170,17 @@ defmodule LambdaEthereumConsensus.Beacon.BeaconChain do
170
170
def handle_info ( :on_tick , state ) do
171
171
schedule_next_tick ( )
172
172
time = :os . system_time ( :second )
173
- ForkChoice . on_tick ( time )
174
-
175
- # TODO: reduce time between ticks to account for gnosis' 5s slot time.
176
- old_logical_time = compute_logical_time ( state )
177
173
new_state = % BeaconChainState { state | time: time }
178
- new_logical_time = compute_logical_time ( new_state )
179
174
180
- if old_logical_time != new_logical_time do
181
- notify_subscribers ( new_logical_time )
175
+ if time >= state . genesis_time do
176
+ ForkChoice . on_tick ( time )
177
+ # TODO: reduce time between ticks to account for gnosis' 5s slot time.
178
+ old_logical_time = compute_logical_time ( state )
179
+ new_logical_time = compute_logical_time ( new_state )
180
+
181
+ if old_logical_time != new_logical_time do
182
+ notify_subscribers ( new_logical_time )
183
+ end
182
184
end
183
185
184
186
{ :noreply , new_state }
You can’t perform that action at this time.
0 commit comments