Skip to content

Commit

Permalink
Add nosync flag to init (#1929)
Browse files Browse the repository at this point in the history
Co-authored-by: zenground0 <[email protected]>
  • Loading branch information
ZenGround0 and ZenGround0 authored Jun 17, 2024
1 parent 448710d commit 23ae0d6
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions cmd/boostd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ var initCmd = &cli.Command{
Usage: "max size for staging area in bytes",
Required: true,
},
&cli.BoolFlag{
Name: "nosync",
Usage: "dont wait for the full node to sync with the chain",
},
}...),
Before: before,
Action: func(cctx *cli.Context) error {
Expand Down Expand Up @@ -181,10 +185,11 @@ func initBoost(ctx context.Context, cctx *cli.Context, marketsRepo lotus_repo.Lo
}
defer closer()

fmt.Println("Checking full node sync status")

if err := lcli.SyncWait(ctx, &v0api.WrapperV1Full{FullNode: api}, false); err != nil {
return nil, fmt.Errorf("sync wait: %w", err)
if !cctx.Bool("nosync") {
fmt.Println("Checking full node sync status")
if err := lcli.SyncWait(ctx, &v0api.WrapperV1Full{FullNode: api}, false); err != nil {
return nil, fmt.Errorf("sync wait: %w", err)
}
}

repoPath := cctx.String(FlagBoostRepo)
Expand Down

0 comments on commit 23ae0d6

Please sign in to comment.