Merge pull request #601 from Roasbeef/recovery-bug-fix-node

wallet: only log block batch if non-empty
This commit is contained in:
Olaoluwa Osuntokun 2019-03-01 13:43:46 -03:00 committed by GitHub
commit 8c64a08971
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -732,8 +732,10 @@ func (w *Wallet) recovery(startHeight int32) error {
return err return err
} }
log.Infof("Recovered addresses from blocks %d-%d", blockBatch[0].Height, if len(blockBatch) > 0 {
blockBatch[len(blockBatch)-1].Height) log.Infof("Recovered addresses from blocks %d-%d", blockBatch[0].Height,
blockBatch[len(blockBatch)-1].Height)
}
return nil return nil
} }