Skip to content

Commit

Permalink
fix(core-elasticsearch): create a unique round ID (#3659)
Browse files Browse the repository at this point in the history
  • Loading branch information
faustbrian authored Apr 26, 2020
1 parent 6a5dc31 commit 5911c7c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/core-elasticsearch/src/indices/rounds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export class Rounds extends Index {
this.logger.info(`[ES] Indexing ${rows.length} round slots [${first(rounds)} - ${last(rounds)}]`);

try {
for (const row of rows) {
row.id = `${row.height}_${row.publicKey}`;
}

await this.bulkUpsert(rows);

storage.update({
Expand Down

0 comments on commit 5911c7c

Please sign in to comment.