[#455] revert queue priority downgrade changes from [#435] (#456)

Closes #455

this reverts queue priority changes from commit `a5d0e447748257d2af5c9101391dd05a5ce929a2` since we detected it might prevent downloads to be scheduled in a
timely fashion

Co-authored-by: pacu <pacu@pacus-MacBook-Pro.local>
This commit is contained in:
Francisco Gindre 2022-08-15 13:03:03 -07:00 committed by GitHub
parent a37c140441
commit 40df80ef25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -86,7 +86,7 @@ extension CompactBlockStorage: CompactBlockRepository {
} }
func latestHeight(result: @escaping (Swift.Result<BlockHeight, Error>) -> Void) { func latestHeight(result: @escaping (Swift.Result<BlockHeight, Error>) -> Void) {
DispatchQueue.global(qos: .default).async { DispatchQueue.global(qos: .userInitiated).async {
do { do {
result(.success(try self.latestBlockHeight())) result(.success(try self.latestBlockHeight()))
} catch { } catch {
@ -100,7 +100,7 @@ extension CompactBlockStorage: CompactBlockRepository {
} }
func write(blocks: [ZcashCompactBlock], completion: ((Error?) -> Void)?) { func write(blocks: [ZcashCompactBlock], completion: ((Error?) -> Void)?) {
DispatchQueue.global(qos: .default).async { DispatchQueue.global(qos: .userInitiated).async {
do { do {
try self.insert(blocks) try self.insert(blocks)
completion?(nil) completion?(nil)
@ -111,7 +111,7 @@ extension CompactBlockStorage: CompactBlockRepository {
} }
func rewind(to height: BlockHeight, completion: ((Error?) -> Void)?) { func rewind(to height: BlockHeight, completion: ((Error?) -> Void)?) {
DispatchQueue.global(qos: .default).async { DispatchQueue.global(qos: .userInitiated).async {
do { do {
try self.rewind(to: height) try self.rewind(to: height)
completion?(nil) completion?(nil)

View File

@ -1397,7 +1397,7 @@ extension CompactBlockProcessor {
queue: DispatchQueue?, queue: DispatchQueue?,
result: @escaping (Result<FigureNextBatchOperation.NextState, Error>) -> Void result: @escaping (Result<FigureNextBatchOperation.NextState, Error>) -> Void
) { ) {
let dispatchQueue = queue ?? DispatchQueue.global(qos: .default) let dispatchQueue = queue ?? DispatchQueue.global(qos: .userInitiated)
dispatchQueue.async { dispatchQueue.async {
do { do {

View File

@ -50,7 +50,7 @@ class PagedTransactionDAO: PaginatedTransactionRepository {
} }
func page(_ number: Int, result: @escaping (Result<[TransactionEntity]?, Error>) -> Void) { func page(_ number: Int, result: @escaping (Result<[TransactionEntity]?, Error>) -> Void) {
DispatchQueue.global(qos: .default).async { [weak self] in DispatchQueue.global(qos: .userInitiated).async { [weak self] in
guard let self = self else { return } guard let self = self else { return }
do { do {
result(.success(try self.page(number))) result(.success(try self.page(number)))

View File

@ -35,7 +35,7 @@ class PersistentTransactionManager: OutboundTransactionManager {
self.encoder = encoder self.encoder = encoder
self.service = service self.service = service
self.network = networkType self.network = networkType
self.queue = DispatchQueue.init(label: "PersistentTransactionManager.serial.queue", qos: .default) self.queue = DispatchQueue.init(label: "PersistentTransactionManager.serial.queue", qos: .userInitiated)
} }
func initSpend( func initSpend(