Merge pull request #6853 from filecoin-project/frrist/miner-temp-file-path
feat(miner deals): create subdir to miner repo for staged deals
This commit is contained in:
@@ -607,7 +607,7 @@ func StorageProvider(minerAddress dtypes.MinerAddress,
|
||||
df dtypes.StorageDealFilter,
|
||||
) (storagemarket.StorageProvider, error) {
|
||||
net := smnet.NewFromLibp2pHost(h)
|
||||
store, err := piecefilestore.NewLocalFileStore(piecefilestore.OsPath(r.Path()))
|
||||
store, err := piecefilestore.NewLocalFileStore(piecefilestore.OsPath(filepath.Join(r.Path(), "deal-staging")))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -107,6 +107,12 @@ func (lmem *lockedMemRepo) Path() string {
|
||||
}
|
||||
|
||||
if lmem.t == StorageMiner {
|
||||
// this is required due to the method makeDealStaging from cmd/lotus-storage-miner/init.go
|
||||
// deal-staging is the directory deal files are staged in before being sealed into sectors
|
||||
// for offline deal flow.
|
||||
if err := os.MkdirAll(filepath.Join(t, "deal-staging"), 0755); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err := config.WriteStorageFile(filepath.Join(t, fsStorageConfig), stores.StorageConfig{
|
||||
StoragePaths: []stores.LocalPath{
|
||||
{Path: t},
|
||||
|
||||
Reference in New Issue
Block a user