refactor:ffi: replace ClearLayerData with ClearCache (#11352)

* refactor: replace ClearLayerData with ClearCache

The `ClearLayerData` FFI call was accidentally introduced with the
Synthetic PoRep. The call does under the hood exactly what `ClearCache`
is doing. This is a first step to remove `ClearLayerData`t also from
the FFI again, in order to reduce the API surface.

* fix types

---------

Co-authored-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
Volker Mische 2023-10-27 20:30:07 +02:00 committed by GitHub
parent 3f00691f26
commit 21f8f642c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -928,7 +928,7 @@ func (sb *Sealer) SealPreCommit2(ctx context.Context, sector storiface.SectorRef
return storiface.SectorCids{}, xerrors.Errorf("generate synth proofs: %w", err)
}
if err = ffi.ClearLayerData(ssize, paths.Cache); err != nil {
if err = ffi.ClearCache(uint64(ssize), paths.Cache); err != nil {
log.Warn("failed to GenerateSynthProofs(): ", err)
log.Warnf("num:%d tkt:%v, sealedCID:%v, unsealedCID:%v", sector.ID.Number, ticket, sealedCID, unsealedCID)
return storiface.SectorCids{