Skip to content

Commit

Permalink
don't require engine datacap if not set
Browse files Browse the repository at this point in the history
  • Loading branch information
willscott authored and gammazero committed Jun 24, 2021
1 parent d2f56cf commit 214b064
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,12 @@ func (e *Engine) apiGood() bool {
log.Errorw("could not query api for datacap", "error", err)
return false
}
log.Infow("local datacap", "datacap", localCap)

if e.nodeConfig.MinWalletCap.Int64() < 0 {
return true
}

if localCap == nil {
return e.nodeConfig.MinWalletCap.NilOrZero()
}
Expand Down
2 changes: 1 addition & 1 deletion lotus/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func SetupClientFromCLI(cctx *cli.Context) (tasks.NodeConfig, api.FullNode, Node
return tasks.NodeConfig{}, nil, nil, fmt.Errorf("could not parse min wallet balance: %s, %s", cctx.String("minfil"), err)
}
}
mc := big.NewInt(0)
mc := big.NewInt(-1)
if cctx.IsSet("mincap") {
log.Infow("using minimum wallet datacap for picking tasks", cctx.String("mincap"))
if _, ok := mf.SetString(cctx.String("mincap"), 0); !ok {
Expand Down

0 comments on commit 214b064

Please sign in to comment.