Rename to import-snapshot, require more than finality for state export

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera
2020-09-02 17:15:36 +02:00
committed by Łukasz Magiera
parent 528e39fcb3
commit 59f765f7be
2 changed files with 9 additions and 6 deletions
+4 -4
View File
@@ -100,10 +100,10 @@ var DaemonCmd = &cli.Command{
},
&cli.StringFlag{
Name: "import-chain",
Usage: "on first run, load chain from given file",
Usage: "on first run, load chain from given file and validate",
},
&cli.StringFlag{
Name: "snapshot",
Name: "import-snapshot",
Usage: "import chain state from a given chain export file",
},
&cli.BoolFlag{
@@ -195,10 +195,10 @@ var DaemonCmd = &cli.Command{
}
chainfile := cctx.String("import-chain")
snapshot := cctx.String("snapshot")
snapshot := cctx.String("import-snapshot")
if chainfile != "" || snapshot != "" {
if chainfile != "" && snapshot != "" {
return fmt.Errorf("cannot specify both 'snapshot' and 'import-chain'")
return fmt.Errorf("cannot specify both 'import-snapshot' and 'import-chain'")
}
var issnapshot bool
if chainfile == "" {