bug fixes

This commit is contained in:
Niko Storni 2018-08-09 20:19:37 -04:00
parent 07a9b96688
commit 1a6f234331

View file

@ -153,15 +153,15 @@ func (s *Sync) waitForNewBlock() error {
return err return err
} }
for status.BlockchainStatus.Blocks == 0 || status.BlockchainStatus.BlocksBehind != 0 { for status.Wallet.Blocks == 0 || status.Wallet.BlocksBehind != 0 {
time.Sleep(5 * time.Second) time.Sleep(5 * time.Second)
status, err = s.daemon.Status() status, err = s.daemon.Status()
if err != nil { if err != nil {
return err return err
} }
} }
currentBlock := status.BlockchainStatus.Blocks currentBlock := status.Wallet.Blocks
for i := 0; status.BlockchainStatus.Blocks <= currentBlock; i++ { for i := 0; status.Wallet.Blocks <= currentBlock; i++ {
if i%3 == 0 { if i%3 == 0 {
log.Printf("Waiting for new block (%d)...", currentBlock+1) log.Printf("Waiting for new block (%d)...", currentBlock+1)
} }