Skip to content

Commit b403af9

Browse files
committed
doc: document how GenerateUnsealedCID works
1 parent 5304c60 commit b403af9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

commd.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ type stackFrame struct {
1717
commP []byte
1818
}
1919

20+
// GenerateUnsealedCID generates the UnsealedCID (CommD) for a sector of size determined by the
21+
// proofType from the provided pieceInfos by merkleization the CommPs of the pieces.
22+
//
23+
// This function **assumes** that the pieces are already padded to the sector size and may not
24+
// return the correct result if this is not the case.
2025
func GenerateUnsealedCID(proofType abi.RegisteredSealProof, pieceInfos []abi.PieceInfo) (cid.Cid, error) {
2126
spi, found := abi.SealProofInfos[proofType]
2227
if !found {

0 commit comments

Comments
 (0)