Merge pull request #1020 from LukasKorba/1011-Improve-end-of-the-sync-process
[#1011] Improve end of the sync process
This commit is contained in:
commit
c1f7707c95
|
@ -775,7 +775,8 @@ actor CompactBlockProcessor {
|
|||
try await clearCompactBlockCache()
|
||||
|
||||
if !Task.isCancelled {
|
||||
await processBatchFinished(height: anyActionExecuted ? ranges.latestBlockHeight : nil)
|
||||
let newBlocksMined = await ranges.latestBlockHeight < latestBlocksDataProvider.latestBlockHeight
|
||||
await processBatchFinished(height: (anyActionExecuted && !newBlocksMined) ? ranges.latestBlockHeight : nil)
|
||||
}
|
||||
} catch {
|
||||
logger.error("Sync failed with error: \(error)")
|
||||
|
|
Loading…
Reference in New Issue