Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

feat: support filecoin hamt in same schema #338

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion data-structures/hashmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ See [IPLD Schemas](../../schemas) for a definition of this format.
type HashMapRoot struct {
hashAlg Int
bucketSize Int
hamt HashMapNode
hamt &HashMapNode
}

# Non-root node layout
Expand All @@ -113,8 +113,14 @@ type HashMapNode struct {
type Element union {
| &HashMapNode link
| Bucket list
| FilecoinElement map
} representation kinded

type FilecoinElement union {
| &HashMapNode "0"
| Bucket "1"
} representation keyed

type Bucket [ BucketEntry ]

type BucketEntry struct {
Expand Down