Skip to content

Commit

Permalink
Merge pull request #1338 from novasamatech/rc/7.7.2
Browse files Browse the repository at this point in the history
Rc/7.7.2
  • Loading branch information
antonijzelinskij committed Jan 19, 2024
2 parents 209f545 + 96512cc commit 0d1cb08
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,19 @@ 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)
}

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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
}
}

Expand Down

0 comments on commit 0d1cb08

Please sign in to comment.