Skip to content

Commit 5b8fb1b

Browse files
authored
Undeprecate functions which are required for handling CommPv1 (#18)
CIDv1 is not going away for a while and code interfacing with CommPv1 will need these functions and cannot trivially move away from them. Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
1 parent 2d399a8 commit 5b8fb1b

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

commcid.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ func CIDToCommitment(c cid.Cid) (multicodec.Code, multicodec.Code, []byte, error
8181
// by adding:
8282
// - codec: cid.FilCommitmentUnsealed
8383
// - hash type: multihash.SHA2_256_TRUNC254_PADDED
84-
//
85-
// Deprecated: This function should be avoided when possible and DataCommitmentToPieceCidv2 preferred
8684
func DataCommitmentV1ToCID(commD []byte) (cid.Cid, error) {
8785
return CommitmentToCID(multicodec.FilCommitmentUnsealed, multicodec.Sha2_256Trunc254Padded, commD)
8886
}
@@ -194,8 +192,6 @@ func DataCommitmentToPieceCidv2(commD []byte, PayloadSize uint64) (cid.Cid, erro
194192

195193
// CIDToDataCommitmentV1 extracts the raw data commitment from a CID
196194
// after checking for the correct codec and hash types.
197-
//
198-
// Deprecated: This function should be avoided when possible and PieceCidV2ToDataCommitment preferred
199195
func CIDToDataCommitmentV1(c cid.Cid) ([]byte, error) {
200196
codec, _, commD, err := CIDToCommitment(c)
201197
if err != nil {
@@ -322,13 +318,9 @@ func PieceCidV1FromV2(pcidV2 cid.Cid) (cid.Cid, uint64, error) {
322318
// PieceCommitmentV1ToCID converts a commP to a CID
323319
// -- it is just a helper function that is equivalent to
324320
// DataCommitmentV1ToCID.
325-
//
326-
// Deprecated: This function should be avoided when possible and DataCommitmentToPieceCidv2 preferred
327321
var PieceCommitmentV1ToCID = DataCommitmentV1ToCID
328322

329323
// CIDToPieceCommitmentV1 converts a CID to a commP
330324
// -- it is just a helper function that is equivalent to
331325
// CIDToDataCommitmentV1.
332-
//
333-
// Deprecated: This function should be avoided when possible and PieceCidV2ToDataCommitment preferred
334326
var CIDToPieceCommitmentV1 = CIDToDataCommitmentV1

0 commit comments

Comments
 (0)