mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Fix initialization race (#12374)
* block all the sync startup code on init signal * don't need chainStarted if everything blocks * set empty clock by default to work around panics * remove unused clock, zero-value for init-sync --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com> Co-authored-by: Nishant Das <nishdas93@gmail.com>
This commit is contained in:
@@ -67,6 +67,7 @@ func NewService(ctx context.Context, cfg *Config) *Service {
|
||||
chainStarted: abool.New(),
|
||||
counter: ratecounter.NewRateCounter(counterSeconds * time.Second),
|
||||
genesisChan: make(chan time.Time),
|
||||
clock: startup.NewClock(time.Unix(0, 0), [32]byte{}), // default clock to prevent panic
|
||||
}
|
||||
|
||||
return s
|
||||
|
||||
Reference in New Issue
Block a user