Add config command that prints the default config file for a storage miner

This commit is contained in:
lanzafame 2020-08-17 13:51:04 +10:00
parent 5fe85c07b1
commit 0d3aaabd2c
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,22 @@
package main
import (
"fmt"
"github.com/urfave/cli/v2"
"github.com/filecoin-project/lotus/node/config"
)
var configCmd = &cli.Command{
Name: "config",
Usage: "Output default configuration",
Action: func(cctx *cli.Context) error {
comm, err := config.ConfigComment(config.DefaultStorageMiner())
if err != nil {
return err
}
fmt.Println(string(comm))
return nil
},
}

View File

@ -32,6 +32,7 @@ func main() {
initCmd,
runCmd,
stopCmd,
configCmd,
lcli.WithCategory("chain", actorCmd),
lcli.WithCategory("chain", rewardsCmd),
lcli.WithCategory("chain", infoCmd),