Skip to content

Commit

Permalink
very silly bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms committed Jan 4, 2023
1 parent 716fb8b commit f647640
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/pds/src/sql-repo-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ export class SqlRepoStorage extends RepoStorage {
.where('ipld_block.cid', 'in', batch)
.select(['ipld_block.cid as cid', 'ipld_block.content as content'])
.execute()

for (const row of res) {
const cid = CID.parse(row.cid)
blocks.set(cid, row.content)
Expand All @@ -109,7 +108,7 @@ export class SqlRepoStorage extends RepoStorage {
}),
)
this.cache.addMap(blocks)
blocks.add(cached.blocks)
blocks.addMap(cached.blocks)
return { blocks, missing: missing.toList() }
}

Expand Down
2 changes: 1 addition & 1 deletion packages/repo/src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Def } from '@atproto/common/src/check'
import { CID } from 'multiformats/cid'

export class MissingBlockError extends Error {
constructor(public cid: CID, public def?: Def<unknown>) {
constructor(public cid: CID, def?: Def<unknown>) {
let msg = `block not found: ${cid.toString()}`
if (def) {
msg += `, expected type: ${def.name}`
Expand Down

0 comments on commit f647640

Please sign in to comment.