feat(miner deals): create subdir to miner repo for staged deals

This commit is contained in:
frrist
2021-07-29 21:08:38 -07:00
committed by Steven Allen
parent 73b2b5f384
commit ca697c9aa2
3 changed files with 62 additions and 1 deletions
+6
View File
@@ -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},