FIX: missingStartHeight error when scanning from sapling activation

This commit is contained in:
Francisco Gindre 2021-07-02 20:06:44 -03:00
parent f733a6f117
commit c2777dc520
1 changed files with 2 additions and 2 deletions

View File

@ -90,7 +90,7 @@ class CompactBlockStreamDownloadOperation: ZcashOperation {
}
let latestDownloaded = try storage.latestHeight()
let startHeight = max(self.startHeight ?? BlockHeight.empty(), latestDownloaded)
guard startHeight > ZcashSDK.SAPLING_ACTIVATION_HEIGHT else {
guard startHeight >= ZcashSDK.SAPLING_ACTIVATION_HEIGHT else {
throw CompactBlockStreamDownloadOperationError.startHeightMissing
}
@ -182,7 +182,7 @@ class CompactBlockBatchDownloadOperation: ZcashOperation {
self.startedHandler?()
do {
guard startHeight > ZcashSDK.SAPLING_ACTIVATION_HEIGHT else {
guard startHeight >= ZcashSDK.SAPLING_ACTIVATION_HEIGHT else {
throw CompactBlockBatchDownloadOperationError.startHeightMissing
}
var currentHeight = startHeight