fix chainstart waiting on rpc server (#2488)

This commit is contained in:
Nishant Das 2019-05-04 20:04:12 +08:00 committed by GitHub
parent 16b42f4ac6
commit 2442b1a4d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -80,6 +80,7 @@ func NewQuerierService(ctx context.Context,
responseBuf: responseBuf,
currentHeadSlot: cfg.CurrentHeadSlot,
chainStarted: false,
atGenesis: true,
powchain: cfg.PowChain,
chainStartBuf: make(chan time.Time, 1),
peerMap: make(map[peer.ID]uint64),

View File

@ -94,7 +94,7 @@ func (ss *Service) Stop() error {
// Status checks the status of the node. It returns nil if it's synced
// with the rest of the network and no errors occurred. Otherwise, it returns an error.
func (ss *Service) Status() error {
if !ss.querierFinished {
if !ss.querierFinished && !ss.Querier.atGenesis {
return errors.New("querier is still running")
}