Merge pull request #10812 from filecoin-project/fix/set-head-cmd

Change args check
This commit is contained in:
Phi-rjan 2023-05-03 20:52:52 +02:00 committed by GitHub
commit 093d350df3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -388,7 +388,7 @@ var ChainSetHeadCmd = &cli.Command{
defer closer() defer closer()
ctx := ReqContext(cctx) ctx := ReqContext(cctx)
if cctx.NArg() != 1 { if !cctx.Bool("genesis") && !cctx.IsSet("epoch") && cctx.NArg() != 1 {
return IncorrectNumArgs(cctx) return IncorrectNumArgs(cctx)
} }