one more miner init issue

This commit is contained in:
whyrusleeping 2020-03-06 14:23:21 -08:00
parent 3a923e8aae
commit 4101147a5b
2 changed files with 4 additions and 3 deletions

View File

@ -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
}

View File

@ -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