chore: export chain commands

This commit is contained in:
frrist 2021-03-23 16:19:33 -07:00
parent 1062117562
commit 8f6ea05d48
3 changed files with 36 additions and 36 deletions

View File

@ -38,31 +38,31 @@ import (
types "github.com/filecoin-project/lotus/chain/types" types "github.com/filecoin-project/lotus/chain/types"
) )
var chainCmd = &cli.Command{ var ChainCmd = &cli.Command{
Name: "chain", Name: "chain",
Usage: "Interact with filecoin blockchain", Usage: "Interact with filecoin blockchain",
Subcommands: []*cli.Command{ Subcommands: []*cli.Command{
chainHeadCmd, ChainHeadCmd,
chainGetBlock, ChainGetBlock,
chainReadObjCmd, ChainReadObjCmd,
chainDeleteObjCmd, ChainDeleteObjCmd,
chainStatObjCmd, ChainStatObjCmd,
chainGetMsgCmd, ChainGetMsgCmd,
chainSetHeadCmd, ChainSetHeadCmd,
chainListCmd, ChainListCmd,
chainGetCmd, ChainGetCmd,
chainBisectCmd, ChainBisectCmd,
chainExportCmd, ChainExportCmd,
slashConsensusFault, SlashConsensusFault,
chainGasPriceCmd, ChainGasPriceCmd,
chainInspectUsage, ChainInspectUsage,
chainDecodeCmd, ChainDecodeCmd,
chainEncodeCmd, ChainEncodeCmd,
chainDisputeSetCmd, ChainDisputeSetCmd,
}, },
} }
var chainHeadCmd = &cli.Command{ var ChainHeadCmd = &cli.Command{
Name: "head", Name: "head",
Usage: "Print chain head", Usage: "Print chain head",
Action: func(cctx *cli.Context) error { Action: func(cctx *cli.Context) error {
@ -85,7 +85,7 @@ var chainHeadCmd = &cli.Command{
}, },
} }
var chainGetBlock = &cli.Command{ var ChainGetBlock = &cli.Command{
Name: "getblock", Name: "getblock",
Usage: "Get a block and print its details", Usage: "Get a block and print its details",
ArgsUsage: "[blockCid]", ArgsUsage: "[blockCid]",
@ -176,7 +176,7 @@ func apiMsgCids(in []lapi.Message) []cid.Cid {
return out return out
} }
var chainReadObjCmd = &cli.Command{ var ChainReadObjCmd = &cli.Command{
Name: "read-obj", Name: "read-obj",
Usage: "Read the raw bytes of an object", Usage: "Read the raw bytes of an object",
ArgsUsage: "[objectCid]", ArgsUsage: "[objectCid]",
@ -203,7 +203,7 @@ var chainReadObjCmd = &cli.Command{
}, },
} }
var chainDeleteObjCmd = &cli.Command{ var ChainDeleteObjCmd = &cli.Command{
Name: "delete-obj", Name: "delete-obj",
Usage: "Delete an object from the chain blockstore", Usage: "Delete an object from the chain blockstore",
Description: "WARNING: Removing wrong objects from the chain blockstore may lead to sync issues", Description: "WARNING: Removing wrong objects from the chain blockstore may lead to sync issues",
@ -240,7 +240,7 @@ var chainDeleteObjCmd = &cli.Command{
}, },
} }
var chainStatObjCmd = &cli.Command{ var ChainStatObjCmd = &cli.Command{
Name: "stat-obj", Name: "stat-obj",
Usage: "Collect size and ipld link counts for objs", Usage: "Collect size and ipld link counts for objs",
ArgsUsage: "[cid]", ArgsUsage: "[cid]",
@ -287,7 +287,7 @@ var chainStatObjCmd = &cli.Command{
}, },
} }
var chainGetMsgCmd = &cli.Command{ var ChainGetMsgCmd = &cli.Command{
Name: "getmessage", Name: "getmessage",
Usage: "Get and print a message by its cid", Usage: "Get and print a message by its cid",
ArgsUsage: "[messageCid]", ArgsUsage: "[messageCid]",
@ -335,7 +335,7 @@ var chainGetMsgCmd = &cli.Command{
}, },
} }
var chainSetHeadCmd = &cli.Command{ var ChainSetHeadCmd = &cli.Command{
Name: "sethead", Name: "sethead",
Usage: "manually set the local nodes head tipset (Caution: normally only used for recovery)", Usage: "manually set the local nodes head tipset (Caution: normally only used for recovery)",
ArgsUsage: "[tipsetkey]", ArgsUsage: "[tipsetkey]",
@ -384,7 +384,7 @@ var chainSetHeadCmd = &cli.Command{
}, },
} }
var chainInspectUsage = &cli.Command{ var ChainInspectUsage = &cli.Command{
Name: "inspect-usage", Name: "inspect-usage",
Usage: "Inspect block space usage of a given tipset", Usage: "Inspect block space usage of a given tipset",
Flags: []cli.Flag{ Flags: []cli.Flag{
@ -529,7 +529,7 @@ var chainInspectUsage = &cli.Command{
}, },
} }
var chainListCmd = &cli.Command{ var ChainListCmd = &cli.Command{
Name: "list", Name: "list",
Aliases: []string{"love"}, Aliases: []string{"love"},
Usage: "View a segment of the chain", Usage: "View a segment of the chain",
@ -658,7 +658,7 @@ var chainListCmd = &cli.Command{
}, },
} }
var chainGetCmd = &cli.Command{ var ChainGetCmd = &cli.Command{
Name: "get", Name: "get",
Usage: "Get chain DAG node by path", Usage: "Get chain DAG node by path",
ArgsUsage: "[path]", ArgsUsage: "[path]",
@ -905,7 +905,7 @@ func printTipSet(format string, ts *types.TipSet) {
fmt.Println(format) fmt.Println(format)
} }
var chainBisectCmd = &cli.Command{ var ChainBisectCmd = &cli.Command{
Name: "bisect", Name: "bisect",
Usage: "bisect chain for an event", Usage: "bisect chain for an event",
ArgsUsage: "[minHeight maxHeight path shellCommand <shellCommandArgs (if any)>]", ArgsUsage: "[minHeight maxHeight path shellCommand <shellCommandArgs (if any)>]",
@ -1028,7 +1028,7 @@ var chainBisectCmd = &cli.Command{
}, },
} }
var chainExportCmd = &cli.Command{ var ChainExportCmd = &cli.Command{
Name: "export", Name: "export",
Usage: "export chain to a car file", Usage: "export chain to a car file",
ArgsUsage: "[outputPath]", ArgsUsage: "[outputPath]",
@ -1106,7 +1106,7 @@ var chainExportCmd = &cli.Command{
}, },
} }
var slashConsensusFault = &cli.Command{ var SlashConsensusFault = &cli.Command{
Name: "slash-consensus", Name: "slash-consensus",
Usage: "Report consensus fault", Usage: "Report consensus fault",
ArgsUsage: "[blockCid1 blockCid2]", ArgsUsage: "[blockCid1 blockCid2]",
@ -1227,7 +1227,7 @@ var slashConsensusFault = &cli.Command{
}, },
} }
var chainGasPriceCmd = &cli.Command{ var ChainGasPriceCmd = &cli.Command{
Name: "gas-price", Name: "gas-price",
Usage: "Estimate gas prices", Usage: "Estimate gas prices",
Action: func(cctx *cli.Context) error { Action: func(cctx *cli.Context) error {
@ -1254,7 +1254,7 @@ var chainGasPriceCmd = &cli.Command{
}, },
} }
var chainDecodeCmd = &cli.Command{ var ChainDecodeCmd = &cli.Command{
Name: "decode", Name: "decode",
Usage: "decode various types", Usage: "decode various types",
Subcommands: []*cli.Command{ Subcommands: []*cli.Command{
@ -1334,7 +1334,7 @@ var chainDecodeParamsCmd = &cli.Command{
}, },
} }
var chainEncodeCmd = &cli.Command{ var ChainEncodeCmd = &cli.Command{
Name: "encode", Name: "encode",
Usage: "encode various types", Usage: "encode various types",
Subcommands: []*cli.Command{ Subcommands: []*cli.Command{

View File

@ -74,7 +74,7 @@ var Commands = []*cli.Command{
WithCategory("developer", authCmd), WithCategory("developer", authCmd),
WithCategory("developer", mpoolCmd), WithCategory("developer", mpoolCmd),
WithCategory("developer", stateCmd), WithCategory("developer", stateCmd),
WithCategory("developer", chainCmd), WithCategory("developer", ChainCmd),
WithCategory("developer", LogCmd), WithCategory("developer", LogCmd),
WithCategory("developer", waitApiCmd), WithCategory("developer", waitApiCmd),
WithCategory("developer", fetchParamCmd), WithCategory("developer", fetchParamCmd),

View File

@ -35,7 +35,7 @@ type minerDeadline struct {
index uint64 index uint64
} }
var chainDisputeSetCmd = &cli.Command{ var ChainDisputeSetCmd = &cli.Command{
Name: "disputer", Name: "disputer",
Usage: "interact with the window post disputer", Usage: "interact with the window post disputer",
Flags: []cli.Flag{ Flags: []cli.Flag{