Skip to content

Commit 23ae0d6

Browse files
authored
Add nosync flag to init (#1929)
Co-authored-by: zenground0 <[email protected]>
1 parent 448710d commit 23ae0d6

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

cmd/boostd/init.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ var initCmd = &cli.Command{
5656
Usage: "max size for staging area in bytes",
5757
Required: true,
5858
},
59+
&cli.BoolFlag{
60+
Name: "nosync",
61+
Usage: "dont wait for the full node to sync with the chain",
62+
},
5963
}...),
6064
Before: before,
6165
Action: func(cctx *cli.Context) error {
@@ -181,10 +185,11 @@ func initBoost(ctx context.Context, cctx *cli.Context, marketsRepo lotus_repo.Lo
181185
}
182186
defer closer()
183187

184-
fmt.Println("Checking full node sync status")
185-
186-
if err := lcli.SyncWait(ctx, &v0api.WrapperV1Full{FullNode: api}, false); err != nil {
187-
return nil, fmt.Errorf("sync wait: %w", err)
188+
if !cctx.Bool("nosync") {
189+
fmt.Println("Checking full node sync status")
190+
if err := lcli.SyncWait(ctx, &v0api.WrapperV1Full{FullNode: api}, false); err != nil {
191+
return nil, fmt.Errorf("sync wait: %w", err)
192+
}
188193
}
189194

190195
repoPath := cctx.String(FlagBoostRepo)

0 commit comments

Comments
 (0)