diff --git a/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/apisync/blockchair/BlockchairApiSyncer.kt b/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/apisync/blockchair/BlockchairApiSyncer.kt index 5dfeb528..ac159978 100644 --- a/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/apisync/blockchair/BlockchairApiSyncer.kt +++ b/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/apisync/blockchair/BlockchairApiSyncer.kt @@ -38,6 +38,7 @@ class BlockchairApiSyncer( override fun sync() { scanSingle() .subscribeOn(Schedulers.io()) + .observeOn(Schedulers.io()) .subscribe({}, { handleError(it) }).let { @@ -48,6 +49,7 @@ class BlockchairApiSyncer( override fun syncLastBlock() { syncLastBlockSingle() .subscribeOn(Schedulers.io()) + .observeOn(Schedulers.io()) .subscribe({}, { handleError(it) }).let { diff --git a/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/apisync/legacy/ApiSyncer.kt b/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/apisync/legacy/ApiSyncer.kt index 8b098a2d..31976dd1 100644 --- a/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/apisync/legacy/ApiSyncer.kt +++ b/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/apisync/legacy/ApiSyncer.kt @@ -34,6 +34,7 @@ class ApiSyncer( override fun sync() { val disposable = blockHashDiscovery.discoverBlockHashes() .subscribeOn(Schedulers.io()) + .observeOn(Schedulers.io()) .subscribe( { (publicKeys, blockHashes) -> val sortedUniqueBlockHashes = blockHashes.distinctBy { it.height }.sortedBy { it.height }