diff --git a/cmd/lotus-storage-miner/init.go b/cmd/lotus-storage-miner/init.go index e6395af7f..03537d820 100644 --- a/cmd/lotus-storage-miner/init.go +++ b/cmd/lotus-storage-miner/init.go @@ -519,9 +519,10 @@ func configureStorageMiner(ctx context.Context, api lapi.FullNode, addr address. return nil } -func createStorageMiner(ctx context.Context, api lapi.FullNode, peerid peer.ID, cctx *cli.Context) (addr address.Address, err error) { +func createStorageMiner(ctx context.Context, api lapi.FullNode, peerid peer.ID, cctx *cli.Context) (address.Address, error) { log.Info("Creating StorageMarket.CreateStorageMiner message") + var err error var owner address.Address if cctx.String("owner") != "" { owner, err = address.NewFromString(cctx.String("owner")) @@ -595,5 +596,5 @@ func createStorageMiner(ctx context.Context, api lapi.FullNode, peerid peer.ID, } log.Infof("New storage miners address is: %s (%s)", retval.IDAddress, retval.RobustAddress) - return addr, nil + return retval.IDAddress, nil } diff --git a/storage/sealmgr/advmgr/storage.go b/storage/sealmgr/advmgr/storage.go index 564935942..fda718b5b 100644 --- a/storage/sealmgr/advmgr/storage.go +++ b/storage/sealmgr/advmgr/storage.go @@ -58,7 +58,7 @@ func (st *storage) openPath(p string) error { if err != nil { if os.IsNotExist(err) { if err := os.MkdirAll(filepath.Join(p, t.String()), 0755); err != nil { - return xerrors.Errorf("mkdir '%s': %w", filepath.Join(p, t.String()), err) + return xerrors.Errorf("openPath mkdir '%s': %w", filepath.Join(p, t.String()), err) } continue