From 2c1a6408de4aa417fad7f0130d89e454dc8dce18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Wed, 2 Sep 2020 14:57:44 +0200 Subject: [PATCH] docsgen, fix snapshot flag name --- cmd/lotus/daemon.go | 10 +++++----- documentation/en/api-methods.md | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cmd/lotus/daemon.go b/cmd/lotus/daemon.go index f1567938b0c..b7365662ea1 100644 --- a/cmd/lotus/daemon.go +++ b/cmd/lotus/daemon.go @@ -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") { diff --git a/documentation/en/api-methods.md b/documentation/en/api-methods.md index fbee92c8357..d60e87eb18c 100644 --- a/documentation/en/api-methods.md +++ b/documentation/en/api-methods.md @@ -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"