From 2602564b40b8c352a60b58c4263bcbff36fe26b3 Mon Sep 17 00:00:00 2001 From: librelois <elois@ifee.fr> Date: Sun, 5 Apr 2020 19:40:59 +0200 Subject: [PATCH] [fix] BR_G24: if block version < 12, stepMax=7 --- app/lib/indexer.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/lib/indexer.ts b/app/lib/indexer.ts index df184e6b7..c75e894da 100644 --- a/app/lib/indexer.ts +++ b/app/lib/indexer.ts @@ -933,10 +933,12 @@ yarn // BR_G24 // Global testing, because of wotb - const oneIsOutdistanced = await checkPeopleAreNotOudistanced( - Underscore.filter(mindex, (entry: MindexEntry) => !entry.revoked_on).map( - (entry: MindexEntry) => entry.pub - ), + let stepMax = conf.stepMax; + if (HEAD.version < 12) { + conf.stepMax = 7; + } + const oneIsOutdistanced = await checkPeopleAreNotOudistanced( + Underscore.filter(mindex, (entry: MindexEntry) => !entry.revoked_on).map((entry: MindexEntry) => entry.pub), cindex.reduce((newLinks, c: CindexEntry) => { newLinks[c.receiver] = newLinks[c.receiver] || []; newLinks[c.receiver].push(c.issuer); @@ -956,6 +958,9 @@ yarn ENTRY.distanceOK = true; } }); + if (HEAD.version < 12) { + conf.stepMax = stepMax; + } // BR_G25 await Promise.all( -- GitLab