diff --git a/build.gradle b/build.gradle index d617c447f3..8fae7919ba 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,8 @@ buildscript { ext { // App version - versionName = '7.7.1' - versionCode = 109 + versionName = '7.7.2' + versionCode = 110 applicationId = "io.novafoundation.nova" releaseApplicationSuffix = "market" diff --git a/feature-staking-impl/src/main/java/io/novafoundation/nova/feature_staking_impl/data/network/blockhain/updaters/ValidatorExposureUpdater.kt b/feature-staking-impl/src/main/java/io/novafoundation/nova/feature_staking_impl/data/network/blockhain/updaters/ValidatorExposureUpdater.kt index a93cc16001..36c8cee5e3 100644 --- a/feature-staking-impl/src/main/java/io/novafoundation/nova/feature_staking_impl/data/network/blockhain/updaters/ValidatorExposureUpdater.kt +++ b/feature-staking-impl/src/main/java/io/novafoundation/nova/feature_staking_impl/data/network/blockhain/updaters/ValidatorExposureUpdater.kt @@ -77,6 +77,8 @@ class ValidatorExposureUpdater( } private suspend fun checkValuesInCache(era: BigInteger, chainId: String, runtimeSnapshot: RuntimeSnapshot): Boolean { + if (!isPagedExposuresFlagInCache(chainId)) return false + if (runtimeSnapshot.pagedExposuresEnabled()) { return isPagedExposuresInCache(era, chainId, runtimeSnapshot) || isLegacyExposuresInCache(era, chainId, runtimeSnapshot) } @@ -84,6 +86,10 @@ class ValidatorExposureUpdater( return isLegacyExposuresInCache(era, chainId, runtimeSnapshot) } + private suspend fun isPagedExposuresFlagInCache(chainId: String): Boolean { + return storageCache.isFullKeyInCache(STORAGE_KEY_PAGED_EXPOSURES, chainId) + } + private suspend fun isPagedExposuresInCache(era: BigInteger, chainId: String, runtimeSnapshot: RuntimeSnapshot): Boolean { val prefix = runtimeSnapshot.eraStakersOverviewPrefixFor(era) diff --git a/runtime/src/main/java/io/novafoundation/nova/runtime/multiNetwork/runtime/RuntimeSyncService.kt b/runtime/src/main/java/io/novafoundation/nova/runtime/multiNetwork/runtime/RuntimeSyncService.kt index 17a0b438d2..fe5e120bd0 100644 --- a/runtime/src/main/java/io/novafoundation/nova/runtime/multiNetwork/runtime/RuntimeSyncService.kt +++ b/runtime/src/main/java/io/novafoundation/nova/runtime/multiNetwork/runtime/RuntimeSyncService.kt @@ -97,12 +97,13 @@ class RuntimeSyncService( cancelExistingSync(chainId) syncingChains[chainId] = launch(syncDispatcher) { - runCatching { - val syncResult = sync(chainId, forceFullSync) - syncResult?.let { _syncStatusFlow.emit(it) } - } + val syncResult = runCatching { + sync(chainId, forceFullSync) + }.getOrNull() syncFinished(chainId) + + syncResult?.let { _syncStatusFlow.emit(it) } } }