Merge pull request #241 from zcash/issue-240

Issue 240: reorg logic fails do to ARC deallocating operation
This commit is contained in:
Francisco Gindre 2021-01-05 17:06:29 -03:00 committed by GitHub
commit 50b4cdb55c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 9 deletions

View File

@ -66,10 +66,10 @@ PODS:
- SwiftNIOFoundationCompat (< 3, >= 2.22.0)
- SwiftNIOTLS (< 3, >= 2.22.0)
- SwiftProtobuf (1.12.0)
- ZcashLightClientKit (0.8.0):
- ZcashLightClientKit (0.9.1):
- gRPC-Swift (= 1.0.0-alpha.19)
- SQLite.swift (~> 0.12.2)
- ZcashLightClientKit/Tests (0.8.0):
- ZcashLightClientKit/Tests (0.9.1):
- gRPC-Swift (= 1.0.0-alpha.19)
- SQLite.swift (~> 0.12.2)
@ -145,7 +145,7 @@ SPEC CHECKSUMS:
SwiftNIOTLS: 46bb3a0ff37d6b52ae6baf5207ec3cd411da327c
SwiftNIOTransportServices: 801923921fbecdcde1e1c1ff38e812167d01ead1
SwiftProtobuf: 4ef85479c18ca85b5482b343df9c319c62bda699
ZcashLightClientKit: 82c225b8ebe4bb44983acc6fb47e043d68a01651
ZcashLightClientKit: d5a681033b3f59c59c93837232ed7890d3e07918
PODFILE CHECKSUM: 7d5095283dc02470f40ab06564d94076ba16d570

View File

@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'ZcashLightClientKit'
s.version = '0.9.0'
s.version = '0.9.1'
s.summary = 'Zcash Light Client wallet SDK for iOS'
s.description = <<-DESC

View File

@ -438,7 +438,7 @@ public class CompactBlockProcessor {
guard let self = self else { return }
guard let validationError = error as? CompactBlockValidationError else {
LoggerProxy.debug("Warning: validateChain operation returning generic error: \(error)")
LoggerProxy.error("Warning: validateChain operation returning generic error: \(error)")
return
}

View File

@ -41,8 +41,7 @@ class CompactBlockValidationOperation: ZcashOperation {
let error = CompactBlockValidationError.validationFailed(height: BlockHeight(result))
self.error = error
LoggerProxy.debug("block scanning failed with error: \(String(describing: self.error))")
self.cancel()
self.fail()
self.fail(error: error)
return
}
}

View File

@ -52,7 +52,7 @@ class ZcashOperation: Operation {
self.dependencies.first { $0.isCancelled } != nil
}
func fail() {
func fail(error: Error? = nil) {
defer {
self.cancel()
}
@ -63,7 +63,8 @@ class ZcashOperation: Operation {
}
self.handlerDispatchQueue.async { [weak self] in
errorHandler(self?.error ?? ZcashOperationError.unknown)
let e = error ?? (self?.error ?? ZcashOperationError.unknown)
errorHandler(e)
}
}