Do Not Wait Till Genesis (#6225)

* don't wait
This commit is contained in:
Nishant Das 2020-06-12 19:44:04 +08:00 committed by GitHub
parent 89762492c8
commit 82f4d6a14a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,6 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/p2p"
"github.com/prysmaticlabs/prysm/beacon-chain/state/stategen"
"github.com/prysmaticlabs/prysm/shared"
"github.com/prysmaticlabs/prysm/shared/roughtime"
"github.com/prysmaticlabs/prysm/shared/runutil"
)
@ -226,10 +225,7 @@ func (r *Service) registerHandlers() {
return
}
log.WithField("starttime", data.StartTime).Debug("Received state initialized event")
if data.StartTime.After(roughtime.Now()) {
stateSub.Unsubscribe()
time.Sleep(roughtime.Until(data.StartTime))
}
stateSub.Unsubscribe()
r.chainStarted = true
}
case <-r.ctx.Done():