docsgen, fix snapshot flag name
This commit is contained in:
parent
2b16e69e90
commit
528e39fcb3
@ -103,7 +103,7 @@ var DaemonCmd = &cli.Command{
|
|||||||
Usage: "on first run, load chain from given file",
|
Usage: "on first run, load chain from given file",
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "checkpoint",
|
Name: "snapshot",
|
||||||
Usage: "import chain state from a given chain export file",
|
Usage: "import chain state from a given chain export file",
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
@ -195,15 +195,15 @@ var DaemonCmd = &cli.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
chainfile := cctx.String("import-chain")
|
chainfile := cctx.String("import-chain")
|
||||||
snapshot := cctx.String("checkpoint")
|
snapshot := cctx.String("snapshot")
|
||||||
if chainfile != "" || snapshot != "" {
|
if chainfile != "" || snapshot != "" {
|
||||||
if chainfile != "" && snapshot != "" {
|
if chainfile != "" && snapshot != "" {
|
||||||
return fmt.Errorf("cannot specify both 'snapshot' and 'import-chain'")
|
return fmt.Errorf("cannot specify both 'snapshot' and 'import-chain'")
|
||||||
}
|
}
|
||||||
var ischeckpoint bool
|
var issnapshot bool
|
||||||
if chainfile == "" {
|
if chainfile == "" {
|
||||||
chainfile = snapshot
|
chainfile = snapshot
|
||||||
ischeckpoint = true
|
issnapshot = true
|
||||||
}
|
}
|
||||||
|
|
||||||
chainfile, err := homedir.Expand(chainfile)
|
chainfile, err := homedir.Expand(chainfile)
|
||||||
@ -211,7 +211,7 @@ var DaemonCmd = &cli.Command{
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := ImportChain(r, chainfile, ischeckpoint); err != nil {
|
if err := ImportChain(r, chainfile, issnapshot); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if cctx.Bool("halt-after-import") {
|
if cctx.Bool("halt-after-import") {
|
||||||
|
@ -268,6 +268,9 @@ blockchain, but that do not require any form of state computation.
|
|||||||
|
|
||||||
### ChainExport
|
### ChainExport
|
||||||
ChainExport returns a stream of bytes with CAR dump of chain data.
|
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
|
Perms: read
|
||||||
@ -275,6 +278,7 @@ Perms: read
|
|||||||
Inputs:
|
Inputs:
|
||||||
```json
|
```json
|
||||||
[
|
[
|
||||||
|
10101,
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
||||||
|
Loading…
Reference in New Issue
Block a user