Skip to content

Commit

Permalink
feat: add config option to control fanout size (#356)
Browse files Browse the repository at this point in the history
* feat: add config option to control fanout size

Adds a `shardFanoutBytes` option to the importer to allow configuring
the number of bytes used for the HAMT prefix, also a test.

* fix: use fanout "bits" (#357)

---------

Co-authored-by: Rod Vagg <rod@vagg.org>
  • Loading branch information
achingbrain and rvagg committed Aug 25, 2023
1 parent 3382a8f commit 96c2af5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async function * listDirectory (node: PBNode, path: string, resolve: Resolve, de
throw errCode(err, 'ERR_NOT_UNIXFS')
}

if (!dir.fanout) {
if (dir.fanout == null) {
throw errCode(new Error('missing fanout'), 'ERR_NOT_UNIXFS')
}

Expand Down

0 comments on commit 96c2af5

Please sign in to comment.