Review Response

This commit is contained in:
zenground0 2021-11-30 13:53:37 -05:00 committed by Jennifer Wang
parent c4069824f7
commit 4936b4ea44
3 changed files with 14 additions and 9 deletions

2
extern/filecoin-ffi vendored

@ -1 +1 @@
Subproject commit b1a66cfd12686a8af6030fccace49916849b1954 Subproject commit ce7083b3d187ec3bc41a68ab66567bd4f3be6dfc

View File

@ -685,9 +685,9 @@ func (sb *Sealer) ReplicaUpdate(ctx context.Context, sector storage.SectorRef, p
} }
// XXX: we want to keep the stuff at the end // XXX: we want to keep the stuff at the end
// if err := os.Truncate(paths.Unsealed, sealedSize); err != nil { if err := os.Truncate(paths.Unsealed, sealedSize); err != nil {
// return empty, xerrors.Errorf("failed to truncate unsealed data file: %w", err) return empty, xerrors.Errorf("failed to truncate unsealed data file: %w", err)
// } }
sealed, unsealed, err := ffi.SectorUpdate.EncodeInto(updateProofType, paths.Update, paths.UpdateCache, paths.Sealed, paths.Cache, paths.Unsealed, pieces) sealed, unsealed, err := ffi.SectorUpdate.EncodeInto(updateProofType, paths.Update, paths.UpdateCache, paths.Sealed, paths.Cache, paths.Unsealed, pieces)
if err != nil { if err != nil {

View File

@ -68,11 +68,16 @@ func newTestStorage(t *testing.T) *testStorage {
} }
func (t testStorage) cleanup() { func (t testStorage) cleanup() {
// for _, path := range t.StoragePaths { noCleanup := os.Getenv("LOTUS_TEST_NO_CLEANUP") != ""
// if err := os.RemoveAll(path.Path); err != nil { for _, path := range t.StoragePaths {
// fmt.Println("Cleanup error:", err) if noCleanup {
// } fmt.Printf("Not cleaning up test storage at %s\n", path)
// } continue
}
if err := os.RemoveAll(path.Path); err != nil {
fmt.Println("Cleanup error:", err)
}
}
} }
func (t testStorage) GetStorage() (stores.StorageConfig, error) { func (t testStorage) GetStorage() (stores.StorageConfig, error) {