diff --git a/engine/engine.go b/engine/engine.go index 33a28dd7..74d06c3e 100644 --- a/engine/engine.go +++ b/engine/engine.go @@ -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() } diff --git a/lotus/client.go b/lotus/client.go index 89931ecd..e030e079 100644 --- a/lotus/client.go +++ b/lotus/client.go @@ -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 {