docsgen, fix snapshot flag name

This commit is contained in:
Łukasz Magiera 2020-09-02 14:57:44 +02:00
parent 2b16e69e90
commit 528e39fcb3
2 changed files with 9 additions and 5 deletions

View File

@ -103,7 +103,7 @@ var DaemonCmd = &cli.Command{
Usage: "on first run, load chain from given file",
},
&cli.StringFlag{
Name: "checkpoint",
Name: "snapshot",
Usage: "import chain state from a given chain export file",
},
&cli.BoolFlag{
@ -195,15 +195,15 @@ var DaemonCmd = &cli.Command{
}
chainfile := cctx.String("import-chain")
snapshot := cctx.String("checkpoint")
snapshot := cctx.String("snapshot")
if chainfile != "" || snapshot != "" {
if chainfile != "" && snapshot != "" {
return fmt.Errorf("cannot specify both 'snapshot' and 'import-chain'")
}
var ischeckpoint bool
var issnapshot bool
if chainfile == "" {
chainfile = snapshot
ischeckpoint = true
issnapshot = true
}
chainfile, err := homedir.Expand(chainfile)
@ -211,7 +211,7 @@ var DaemonCmd = &cli.Command{
return err
}
if err := ImportChain(r, chainfile, ischeckpoint); err != nil {
if err := ImportChain(r, chainfile, issnapshot); err != nil {
return err
}
if cctx.Bool("halt-after-import") {

View File

@ -268,6 +268,9 @@ blockchain, but that do not require any form of state computation.
### ChainExport
ChainExport returns a stream of bytes with CAR dump of chain data.
The exported chain data includes the header chain from the given tipset
back to genesis, the entire genesis state, and the most recent 'nroots'
state trees.
Perms: read
@ -275,6 +278,7 @@ Perms: read
Inputs:
```json
[
10101,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"