Skip to content

Commit

Permalink
[gear-idea] Fix index program (#1389)
Browse files Browse the repository at this point in the history
  • Loading branch information
osipov-mit authored Sep 11, 2023
1 parent 33f5c36 commit e9dae9d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions idea/indexer/src/gear/temp-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,16 @@ export class TempState {
this.programs.set(program.id, program);
if (program.metahash) {
if (this.metahashes.has(program.metahash)) {
this.metahashes.get(program.metahash).add(program.code.id);
const meta = this.metahashes.get(program.metahash);
if (program.code) {
meta.add(program.code.id);
}
} else {
this.metahashes.set(program.metahash, new Set([program.code.id]));
const set = new Set<string>();
if (program.code) {
set.add(program.code.id);
}
this.metahashes.set(program.metahash, set);
}
}
}
Expand Down

0 comments on commit e9dae9d

Please sign in to comment.