Commit de4a0e0a authored by Cédric Moreau's avatar Cédric Moreau

[fix] WW: missing some blocks for certifications

parent e22a2294
Pipeline #4977 failed with stages
in 14 minutes and 10 seconds
......@@ -42,7 +42,7 @@ export function requiredBlocksAccumulator(server: Server, wwDAL: WotWizardDAL):
const numbers = Object.keys(blockNumbers).map(n => parseInt(n))
const blocksForCertifications: (DBBlock|null)[] = []
for (let i = 0; i < numbers.length; i += chunkLen) {
const chunk = numbers.slice(0, chunkLen)
const chunk = numbers.slice(0, chunkLen + 1)
logger.debug('Chunk %s-%s', i, i + chunkLen)
;(await Promise.all(chunk.map(n => server.dal.getBlock(n))))
.forEach(b => blocksForCertifications.push(b))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment