mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-05-02 03:02:54 -04:00
Report sync unhealthy in the case that the node is still syncing initially (#3623)
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/libp2p/go-libp2p-core/peer"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/blockchain"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/db"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/operations"
|
||||
@@ -84,6 +85,9 @@ func (r *RegularSync) Stop() error {
|
||||
|
||||
// Status of the currently running regular sync service.
|
||||
func (r *RegularSync) Status() error {
|
||||
if r.initialSync.Syncing(){
|
||||
return errors.New("waiting for initial sync")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user