Skip to content

Commit

Permalink
fix(blockstore-fs): allow non sha-256 multihashes
Browse files Browse the repository at this point in the history
  • Loading branch information
dozyio committed Sep 28, 2024
1 parent 06b7f79 commit b76f466
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/blockstore-fs/src/sharding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class NextToLast implements ShardingStrategy {
}

encode (cid: CID): { dir: string, file: string } {
const str = this.base.encoder.encode(cid.multihash.bytes)
const str = this.base.encoder.encode(cid.bytes)
const prefix = str.substring(str.length - this.prefixLength)

return {
Expand Down Expand Up @@ -97,7 +97,7 @@ export class FlatDirectory implements ShardingStrategy {
}

encode (cid: CID): { dir: string, file: string } {
const str = this.base.encoder.encode(cid.multihash.bytes)
const str = this.base.encoder.encode(cid.bytes)

return {
dir: '',
Expand Down

0 comments on commit b76f466

Please sign in to comment.