add flag to halt after chain importing
This commit is contained in:
parent
955b755055
commit
d9f5f6e2c6
@ -66,6 +66,10 @@ var DaemonCmd = &cli.Command{
|
||||
Name: "import-chain",
|
||||
Usage: "on first run, load chain from given file",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "halt-after-import",
|
||||
Usage: "halt the process after importing chain from file",
|
||||
},
|
||||
},
|
||||
Action: func(cctx *cli.Context) error {
|
||||
ctx := context.Background()
|
||||
@ -96,6 +100,9 @@ var DaemonCmd = &cli.Command{
|
||||
if err := ImportChain(r, chainfile); err != nil {
|
||||
return err
|
||||
}
|
||||
if cctx.Bool("halt-after-import") {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
genesis := node.Options()
|
||||
|
Loading…
Reference in New Issue
Block a user