mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
minor change on hardfork version check
This commit is contained in:
parent
372e87e70f
commit
782d51c1d6
2 changed files with 2 additions and 2 deletions
|
@ -89,7 +89,7 @@ public final class ClosedGroupPoller : NSObject {
|
|||
Threading.pollerQueue.async {
|
||||
var promises: [Promise<Void>] = []
|
||||
if let promise = self?.poll(groupPublicKey) { promises.append(promise) }
|
||||
if SnodeAPI.inHardfork, let promise = self?.poll(groupPublicKey, defaultInbox: true) { promises.append(promise) }
|
||||
if SnodeAPI.duringHardforkTransition, let promise = self?.poll(groupPublicKey, defaultInbox: true) { promises.append(promise) }
|
||||
when(resolved: promises).done(on: Threading.pollerQueue) { _ in
|
||||
self?.pollRecursively(groupPublicKey)
|
||||
}.catch(on: Threading.pollerQueue) { error in
|
||||
|
|
|
@ -31,7 +31,7 @@ public final class SnodeAPI : NSObject {
|
|||
// MARK: Hardfork version
|
||||
private static var hardfork = UserDefaults.standard[.hardfork]
|
||||
private static var softfork = UserDefaults.standard[.softfork]
|
||||
public static var inHardfork: Bool { hardfork >= 19 && softfork >= 1 }
|
||||
public static var duringHardforkTransition: Bool { hardfork == 19 && softfork == 0 }
|
||||
|
||||
// MARK: Settings
|
||||
private static let maxRetryCount: UInt = 8
|
||||
|
|
Loading…
Reference in a new issue