Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mst: clarify in comment that fields are nullable, not optional #766

Merged
merged 1 commit into from
Sep 27, 2024
Merged
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
4 changes: 2 additions & 2 deletions mst/mst.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func CBORTypes() []reflect.Type {
// MST tree node as gets serialized to CBOR. Note that the CBOR fields are all
// single-character.
type nodeData struct {
Left *cid.Cid `cborgen:"l"` // [optional] pointer to lower-level subtree to the "left" of this path/key
Left *cid.Cid `cborgen:"l"` // [nullable] pointer to lower-level subtree to the "left" of this path/key
Entries []treeEntry `cborgen:"e"` // ordered list of entries at this node
}

Expand All @@ -122,7 +122,7 @@ type treeEntry struct {
PrefixLen int64 `cborgen:"p"` // count of characters shared with previous path/key in tree
KeySuffix []byte `cborgen:"k"` // remaining part of path/key (appended to "previous key")
Val cid.Cid `cborgen:"v"` // CID pointer at this path/key
Tree *cid.Cid `cborgen:"t"` // [optional] pointer to lower-level subtree to the "right" of this path/key entry
Tree *cid.Cid `cborgen:"t"` // [nullable] pointer to lower-level subtree to the "right" of this path/key entry
}

// MerkleSearchTree represents an MST tree node (NodeData type). It can be in
Expand Down
Loading