Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update config comment with expected input and defaults #427

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ install-completions:
install -C ./scripts/completion/bash_autocomplete /usr/share/bash-completion/completions/curio
install -C ./scripts/completion/zsh_autocomplete /usr/local/share/zsh/site-functions/_curio

cu2k: GOFLAGS+=-tags=2k
cu2k: CURIO_TAGS+= 2k
cu2k: curio

cfgdoc-gen:
Expand Down
2 changes: 1 addition & 1 deletion cmd/curio/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ func TestConfig(t *testing.T) {
func TestCustomConfigDurationJson(t *testing.T) {
ref := new(jsonschema.Reflector)
ref.Mapper = func(i reflect.Type) *jsonschema.Schema {
if i == reflect.TypeOf(config.Duration(time.Second)) {
if i == reflect.TypeOf(time.Second) {
return &jsonschema.Schema{
Type: "string",
Format: "duration",
Expand Down
4 changes: 2 additions & 2 deletions cmd/curio/tasks/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ func WindowPostScheduler(ctx context.Context, fc config.CurioFees, pc config.Cur
stor paths.Store, idx paths.SectorIndex, max int) (*window2.WdPostTask, *window2.WdPostSubmitTask, *window2.WdPostRecoverDeclareTask, error) {

// todo config
ft := window2.NewSimpleFaultTracker(stor, idx, pc.ParallelCheckLimit, time.Duration(pc.SingleCheckTimeout), time.Duration(pc.PartitionCheckTimeout))
ft := window2.NewSimpleFaultTracker(stor, idx, pc.ParallelCheckLimit, pc.SingleCheckTimeout, pc.PartitionCheckTimeout)

computeTask, err := window2.NewWdPostTask(db, api, ft, stor, verif, paramck, chainSched, addresses, max, pc.ParallelCheckLimit, time.Duration(pc.SingleCheckTimeout))
computeTask, err := window2.NewWdPostTask(db, api, ft, stor, verif, paramck, chainSched, addresses, max, pc.ParallelCheckLimit, pc.SingleCheckTimeout)
if err != nil {
return nil, nil, nil, err
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/sptool/toolbox_deal_tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ var generateRandCar = &cli.Command{
Usage: "creates a randomly generated dense car",
ArgsUsage: "<outputPath>",
Flags: []cli.Flag{
&cli.IntFlag{
&cli.Int64Flag{
Name: "size",
Aliases: []string{"s"},
Usage: "The size of the data to turn into a car",
Expand All @@ -282,11 +282,11 @@ var generateRandCar = &cli.Command{
}

outPath := cctx.Args().Get(0)
size := cctx.Int("size")
size := cctx.Int64("size")
cs := cctx.Int64("chunksize")
ml := cctx.Int("maxlinks")

rf, err := testutils.CreateRandomFile(outPath, int(time.Now().Unix()), size)
rf, err := testutils.CreateRandomFile(outPath, time.Now().Unix(), size)
if err != nil {
return err
}
Expand Down
8 changes: 6 additions & 2 deletions deps/config/common.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package config

import (
"time"
)

type Common struct {
API API
Backup Backup
Expand All @@ -13,7 +17,7 @@ type API struct {
// Binding address for the Binary's API
ListenAddress string
RemoteListenAddress string
Timeout Duration
Timeout time.Duration
}

// // Common
Expand Down Expand Up @@ -63,7 +67,7 @@ type Libp2p struct {
ConnMgrHigh uint
// ConnMgrGrace is a time duration that new connections are immune from being
// closed by the connection manager.
ConnMgrGrace Duration
ConnMgrGrace time.Duration
}

type Pubsub struct {
Expand Down
Loading