v1.27.0-a #10
@ -83,8 +83,8 @@ func StorageAuth(apiKey string) (sealer.StorageAuth, error) {
|
||||
}
|
||||
|
||||
func GetDeps(ctx context.Context, cctx *cli.Context) (*Deps, error) {
|
||||
var deps *Deps
|
||||
return deps, deps.PopulateRemainingDeps(ctx, cctx, true)
|
||||
var deps Deps
|
||||
return &deps, deps.PopulateRemainingDeps(ctx, cctx, true)
|
||||
}
|
||||
|
||||
type Deps struct {
|
||||
@ -107,6 +107,9 @@ const (
|
||||
|
||||
func (deps *Deps) PopulateRemainingDeps(ctx context.Context, cctx *cli.Context, makeRepo bool) error {
|
||||
|
||||
if deps == nil {
|
||||
*deps = Deps{}
|
||||
}
|
||||
var err error
|
||||
if makeRepo {
|
||||
// Open repo
|
||||
|
@ -135,5 +135,6 @@ func ListenAndServe(ctx context.Context, dependencies *deps.Deps, shutdownChan c
|
||||
log.Warn("Graceful shutdown successful")
|
||||
}()
|
||||
|
||||
log.Infof("Setting up RPC server at %s", dependencies.ListenAddr)
|
||||
return srv.ListenAndServe()
|
||||
}
|
||||
|
@ -113,11 +113,12 @@ var runCmd = &cli.Command{
|
||||
}
|
||||
}
|
||||
|
||||
var dependencies *deps.Deps
|
||||
err = dependencies.PopulateRemainingDeps(ctx, cctx, true)
|
||||
var deps deps.Deps
|
||||
err = deps.PopulateRemainingDeps(ctx, cctx, true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
dependencies := &deps
|
||||
|
||||
taskEngine, err := tasks.StartTasks(ctx, dependencies)
|
||||
|
||||
|
0
~/.lotus-provider/journal/lotus-journal.ndjson
Normal file
0
~/.lotus-provider/journal/lotus-journal.ndjson
Normal file
Loading…
Reference in New Issue
Block a user