From 0b8a211e70151c3eaeedcf3298f09e68d6a00adf Mon Sep 17 00:00:00 2001 From: lanzafame Date: Wed, 11 Aug 2021 13:29:52 +1000 Subject: [PATCH] fix: init restore adds empty storage.json --- cmd/lotus-miner/init_restore.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/lotus-miner/init_restore.go b/cmd/lotus-miner/init_restore.go index 393b44dd2d3..0974a7c5dc5 100644 --- a/cmd/lotus-miner/init_restore.go +++ b/cmd/lotus-miner/init_restore.go @@ -223,6 +223,12 @@ func restore(ctx context.Context, cctx *cli.Context, targetPath string, strConfi } } else { log.Warn("--storage-config NOT SET. NO SECTOR PATHS WILL BE CONFIGURED") + // setting empty config to allow miner to be started + if err := lr.SetStorage(func(sc *stores.StorageConfig) { + sc.StoragePaths = append(sc.StoragePaths, stores.LocalPath{}) + }); err != nil { + return xerrors.Errorf("set storage config: %w", err) + } } log.Info("Restoring metadata backup")