FIX: processor crashes when lightwalletd has not caught up with latest height
This commit is contained in:
parent
2d34615c6d
commit
8f415d71ce
|
@ -293,6 +293,10 @@ public class CompactBlockProcessor {
|
|||
|
||||
if self.latestBlockHeight == latestDownloadedBlockHeight {
|
||||
self.processingFinished(height: blockHeight)
|
||||
} else if self.latestBlockHeight < latestDownloadedBlockHeight {
|
||||
// Lightwalletd might be syncing
|
||||
LoggerProxy.info("Lightwalletd might be syncing: latest downloaded block height is: \(latestDownloadedBlockHeight) while latest blockheight is reported at: \(blockHeight)")
|
||||
self.processingFinished(height: latestDownloadedBlockHeight)
|
||||
} else {
|
||||
self.processNewBlocks(range: self.nextBatchBlockRange(latestHeight: self.latestBlockHeight, latestDownloadedHeight: latestDownloadedBlockHeight))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue