Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
steinerkelvin committed Oct 14, 2024
1 parent 39d4067 commit 5dcf925
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/commune-worker/src/workers/weight-aggregator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,13 @@ async function getUserSubnetWeightMap(): Promise<
Map<string, Map<number, bigint>>
> {
const result = await db
.select({>
.select({
userKey: userSubnetDataSchema.userKey,
weight: userSubnetDataSchema.weight,
netuid: subnetDataSchema.netuid,
})
.from(subnetDataSchema)
// filter modules updated on the last seen block
// filter subnets updated on the last seen block
.where(
and(
eq(
Expand All @@ -364,6 +364,7 @@ async function getUserSubnetWeightMap(): Promise<
userSubnetDataSchema,
eq(subnetDataSchema.netuid, userSubnetDataSchema.netuid),
);

const weightMap = new Map<string, Map<number, bigint>>();
result.forEach((entry) => {
if (!weightMap.has(entry.userKey)) {
Expand Down

0 comments on commit 5dcf925

Please sign in to comment.