don't override start() method
This commit is contained in:
parent
392b4ee0d4
commit
7f0e431f4d
|
@ -30,6 +30,7 @@ class CompactBlockDownloadOperation: ZcashOperation {
|
|||
cancel()
|
||||
return
|
||||
}
|
||||
self.startedHandler?()
|
||||
do {
|
||||
try downloader.downloadBlockRange(range)
|
||||
} catch {
|
||||
|
@ -78,6 +79,7 @@ class CompactBlockStreamDownloadOperation: ZcashOperation {
|
|||
cancel()
|
||||
return
|
||||
}
|
||||
self.startedHandler?()
|
||||
do {
|
||||
|
||||
if self.targetHeight == nil {
|
||||
|
@ -178,6 +180,7 @@ class CompactBlockBatchDownloadOperation: ZcashOperation {
|
|||
cancel()
|
||||
return
|
||||
}
|
||||
self.startedHandler?()
|
||||
do {
|
||||
|
||||
guard startHeight > ZcashSDK.SAPLING_ACTIVATION_HEIGHT else {
|
||||
|
|
|
@ -49,7 +49,7 @@ class CompactBlockEnhancementOperation: ZcashOperation {
|
|||
cancel()
|
||||
return
|
||||
}
|
||||
|
||||
self.startedHandler?()
|
||||
// fetch transactions
|
||||
|
||||
do {
|
||||
|
|
|
@ -32,6 +32,7 @@ class CompactBlockScanningOperation: ZcashOperation {
|
|||
cancel()
|
||||
return
|
||||
}
|
||||
self.startedHandler?()
|
||||
guard self.rustBackend.scanBlocks(dbCache: self.cacheDb, dbData: self.dataDb, limit: limit) else {
|
||||
self.error = self.rustBackend.lastError() ?? ZcashOperationError.unknown
|
||||
LoggerProxy.debug("block scanning failed with error: \(String(describing: self.error))")
|
||||
|
@ -134,6 +135,7 @@ class CompactBlockBatchScanningOperation: ZcashOperation {
|
|||
cancel()
|
||||
return
|
||||
}
|
||||
self.startedHandler?()
|
||||
do {
|
||||
if batchSize == 0 {
|
||||
let scanStartTime = Date()
|
||||
|
|
|
@ -35,6 +35,7 @@ class CompactBlockValidationOperation: ZcashOperation {
|
|||
cancel()
|
||||
return
|
||||
}
|
||||
self.startedHandler?()
|
||||
let result = self.rustBackend.validateCombinedChain(dbCache: cacheDb, dbData: dataDb)
|
||||
switch result {
|
||||
case 0:
|
||||
|
|
|
@ -41,8 +41,7 @@ class FetchUnspentTxOutputsOperation: ZcashOperation {
|
|||
cancel()
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
self.startedHandler?()
|
||||
do {
|
||||
let tAddresses = try accountRepository.getAll().map({ $0.transparentAddress })
|
||||
do {
|
||||
|
|
|
@ -38,12 +38,7 @@ class ZcashOperation: Operation {
|
|||
self.handlerDispatchQueue = completionDispatchQueue
|
||||
}
|
||||
|
||||
override func start() {
|
||||
LoggerProxy.debug("\(self) started")
|
||||
super.start()
|
||||
guard !shouldCancel() else { return }
|
||||
startedHandler?()
|
||||
}
|
||||
|
||||
|
||||
func shouldCancel() -> Bool {
|
||||
self.error != nil || isCancelled || dependencyCancelled()
|
||||
|
|
Loading…
Reference in New Issue