From 8da8c7a7212822918dbdcd170b3466d55cc8c3eb Mon Sep 17 00:00:00 2001 From: Benoit Lavenier <benoit.lavenier@e-is.pro> Date: Wed, 10 May 2023 18:54:48 +0200 Subject: [PATCH] [fix] Optimize access to sources by pubkey, using specific index for complex condition - Close #1438 --- app/lib/dal/indexDAL/leveldb/LevelDBSindex.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/lib/dal/indexDAL/leveldb/LevelDBSindex.ts b/app/lib/dal/indexDAL/leveldb/LevelDBSindex.ts index 439713bbc..9b3ea4bcf 100644 --- a/app/lib/dal/indexDAL/leveldb/LevelDBSindex.ts +++ b/app/lib/dal/indexDAL/leveldb/LevelDBSindex.ts @@ -129,9 +129,9 @@ export class LevelDBSindex extends LevelDBTable<SindexEntry> pos: number; }[] > { - const forSimpleConditions = await this.getForConditions(`SIG(${pubkey})`); - const forComplexConditions = await this.getForComplexeConditionPubkey(pubkey); - const reduced = Indexer.DUP_HELPERS.reduceBy(forSimpleConditions.concat(forComplexConditions), [ + const forConditions = await this.getForConditions(`SIG(${pubkey})`); + const forPubkeys = await this.getForComplexeConditionPubkey(pubkey); + const reduced = Indexer.DUP_HELPERS.reduceBy(forConditions.concat(forPubkeys), [ "identifier", "pos", ]); -- GitLab