wait for daemon to fully start

This commit is contained in:
Niko Storni 2018-08-20 15:26:52 -04:00
parent 9eabd4ad0a
commit b970af7b7d
No known key found for this signature in database
GPG key ID: F37FE63398800368

View file

@ -318,8 +318,8 @@ func (s *Sync) waitForDaemonStart() error {
case <-s.grp.Ch(): case <-s.grp.Ch():
return errors.Err("interrupted during daemon startup") return errors.Err("interrupted during daemon startup")
default: default:
_, err := s.daemon.WalletBalance() s, err := s.daemon.Status()
if err == nil { if err == nil && s.StartupStatus.Wallet {
return nil return nil
} }
time.Sleep(5 * time.Second) time.Sleep(5 * time.Second)