Skip to content
Snippets Groups Projects
Commit de4a0e0a authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] WW: missing some blocks for certifications

parent e22a2294
No related branches found
No related tags found
No related merge requests found
......@@ -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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment