[#1011] Improve end of the sync process
- added check for mined blocks, if yes, the next batch is called
This commit is contained in:
parent
505ac6a26c
commit
4197436668
|
@ -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