Fix poll interval and cut it to half (#54)
This commit is contained in:
parent
85ec6b1f95
commit
343507b565
|
@ -371,7 +371,7 @@ public class CompactBlockProcessor {
|
|||
private func processingFinished(height: BlockHeight) {
|
||||
self.state = .synced
|
||||
NotificationCenter.default.post(name: Notification.Name.blockProcessorFinished, object: self, userInfo: [CompactBlockProcessorNotificationKey.latestScannedBlockHeight : height])
|
||||
self.backoffTimer = Timer(timeInterval: TimeInterval(self.config.blockPollInterval), repeats: true, block: { _ in
|
||||
self.backoffTimer = Timer(timeInterval: self.config.blockPollInterval, repeats: true, block: { _ in
|
||||
do {
|
||||
try self.start()
|
||||
} catch {
|
||||
|
|
|
@ -45,10 +45,10 @@ public let EXPIRY_OFFSET = 20
|
|||
public let DEFAULT_BATCH_SIZE = 100
|
||||
|
||||
/**
|
||||
* Default amount of time, in milliseconds, to poll for new blocks. Typically, this should be about half the average
|
||||
* Default amount of time, in in seconds, to poll for new blocks. Typically, this should be about half the average
|
||||
* block time.
|
||||
*/
|
||||
public let DEFAULT_POLL_INTERVAL: UInt64 = 75_000
|
||||
public let DEFAULT_POLL_INTERVAL: TimeInterval = 37.5
|
||||
|
||||
/**
|
||||
* Default attempts at retrying.
|
||||
|
|
Loading…
Reference in New Issue