From f38ddd052e97633fd7f4e192f26e6e877020ce01 Mon Sep 17 00:00:00 2001 From: Mikunj Date: Tue, 14 May 2019 09:23:05 +1000 Subject: [PATCH] Minor fix. --- .../AxolotlStore/OWSPrimaryStorage+PreKeyStore.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SignalServiceKit/src/Storage/AxolotlStore/OWSPrimaryStorage+PreKeyStore.m b/SignalServiceKit/src/Storage/AxolotlStore/OWSPrimaryStorage+PreKeyStore.m index 9acee7547..b354f9b8f 100644 --- a/SignalServiceKit/src/Storage/AxolotlStore/OWSPrimaryStorage+PreKeyStore.m +++ b/SignalServiceKit/src/Storage/AxolotlStore/OWSPrimaryStorage+PreKeyStore.m @@ -21,20 +21,20 @@ NS_ASSUME_NONNULL_BEGIN - (NSArray *)generatePreKeyRecords:(int)batchSize { NSMutableArray *preKeyRecords = [NSMutableArray array]; - + @synchronized(self) { int preKeyId = [self nextPreKeyId:batchSize]; - + OWSLogInfo(@"building %d new preKeys starting from preKeyId: %d", batchSize, preKeyId); for (int i = 0; i < batchSize; i++) { ECKeyPair *keyPair = [Curve25519 generateKeyPair]; PreKeyRecord *record = [[PreKeyRecord alloc] initWithId:preKeyId keyPair:keyPair]; - + [preKeyRecords addObject:record]; preKeyId++; } - + [self.dbReadWriteConnection setInt:preKeyId forKey:TSNextPrekeyIdKey inCollection:TSStorageInternalSettingsCollection]; @@ -42,7 +42,7 @@ NS_ASSUME_NONNULL_BEGIN return preKeyRecords; } -- (NSArray *)generatePreKeyRecords; +- (NSArray *)generatePreKeyRecords { return [self generatePreKeyRecords:BATCH_SIZE]; }