mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 04:47:18 +00:00
Revert changes to sync service status check (#8215)
This commit is contained in:
parent
7135a8542f
commit
392e61fbee
@ -127,7 +127,7 @@ func (s *Service) Stop() error {
|
||||
|
||||
// Status of initial sync.
|
||||
func (s *Service) Status() error {
|
||||
if s.Syncing() {
|
||||
if s.synced.IsNotSet() && s.chainStarted.IsSet() {
|
||||
return errors.New("syncing")
|
||||
}
|
||||
return nil
|
||||
|
@ -327,9 +327,8 @@ func TestService_markSynced(t *testing.T) {
|
||||
assert.Equal(t, false, s.chainStarted.IsSet())
|
||||
assert.Equal(t, false, s.synced.IsSet())
|
||||
assert.Equal(t, true, s.Syncing())
|
||||
assert.ErrorContains(t, "syncing", s.Status())
|
||||
assert.NoError(t, s.Status())
|
||||
s.chainStarted.Set()
|
||||
assert.Equal(t, true, s.Syncing())
|
||||
assert.ErrorContains(t, "syncing", s.Status())
|
||||
|
||||
expectedGenesisTime := time.Unix(358544700, 0)
|
||||
@ -360,7 +359,6 @@ func TestService_markSynced(t *testing.T) {
|
||||
}
|
||||
assert.Equal(t, expectedGenesisTime, receivedGenesisTime)
|
||||
assert.Equal(t, false, s.Syncing())
|
||||
assert.NoError(t, s.Status())
|
||||
}
|
||||
|
||||
func TestService_Resync(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user