Skip to content

Commit

Permalink
remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
anjor committed Jul 18, 2024
1 parent fbe6f6f commit 63303c6
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions cmd-car-split.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,29 +391,3 @@ func writeNode(node datamodel.Node, w io.Writer) (cid.Cid, error) {
}
return cd, nil
}

func cleanup(cp *commp.Calc, namePrefix string, i int, f *os.File) (carFile, error) {
rawCommP, paddedSize, err := cp.Digest()
if err != nil {
return carFile{}, err
}

commCid, err := commcid.DataCommitmentV1ToCID(rawCommP)
if err != nil {
return carFile{}, err
}

f.Close()
// oldn := fmt.Sprintf("%s%d.car", namePrefix, i)
// newn := fmt.Sprintf("%s%s.car", namePrefix, commCid)
// err = os.Rename(oldn, newn)
if err != nil {
return CarFile{}, err
}

return CarFile{
Name: newn,
CommP: commCid,
PaddedSize: paddedSize,
}, nil
}

0 comments on commit 63303c6

Please sign in to comment.