Merge remote-tracking branch 'origin/devnet/7' into feat/interactive-porep

This commit is contained in:
Łukasz Magiera
2019-11-05 18:53:19 +01:00
43 changed files with 1961 additions and 1151 deletions
+5 -1
View File
@@ -2,6 +2,7 @@ package modules
import (
"context"
"fmt"
"math"
"path/filepath"
@@ -163,7 +164,10 @@ func RegisterMiner(lc fx.Lifecycle, ds dtypes.MetadataDS, api api.FullNode) erro
lc.Append(fx.Hook{
OnStart: func(ctx context.Context) error {
log.Infof("Registering miner '%s' with full node", minerAddr)
return api.MinerRegister(ctx, minerAddr)
if err := api.MinerRegister(ctx, minerAddr); err != nil {
return fmt.Errorf("Failed to register miner: %s\nIf you are certain no other storage miner instance is running, try running 'lotus unregister-miner %s' and restarting the storage miner", err, minerAddr)
}
return nil
},
OnStop: func(ctx context.Context) error {
log.Infof("Unregistering miner '%s' from full node", minerAddr)