chore: export chain commands
This commit is contained in:
parent
1062117562
commit
8f6ea05d48
68
cli/chain.go
68
cli/chain.go
@ -38,31 +38,31 @@ import (
|
||||
types "github.com/filecoin-project/lotus/chain/types"
|
||||
)
|
||||
|
||||
var chainCmd = &cli.Command{
|
||||
var ChainCmd = &cli.Command{
|
||||
Name: "chain",
|
||||
Usage: "Interact with filecoin blockchain",
|
||||
Subcommands: []*cli.Command{
|
||||
chainHeadCmd,
|
||||
chainGetBlock,
|
||||
chainReadObjCmd,
|
||||
chainDeleteObjCmd,
|
||||
chainStatObjCmd,
|
||||
chainGetMsgCmd,
|
||||
chainSetHeadCmd,
|
||||
chainListCmd,
|
||||
chainGetCmd,
|
||||
chainBisectCmd,
|
||||
chainExportCmd,
|
||||
slashConsensusFault,
|
||||
chainGasPriceCmd,
|
||||
chainInspectUsage,
|
||||
chainDecodeCmd,
|
||||
chainEncodeCmd,
|
||||
chainDisputeSetCmd,
|
||||
ChainHeadCmd,
|
||||
ChainGetBlock,
|
||||
ChainReadObjCmd,
|
||||
ChainDeleteObjCmd,
|
||||
ChainStatObjCmd,
|
||||
ChainGetMsgCmd,
|
||||
ChainSetHeadCmd,
|
||||
ChainListCmd,
|
||||
ChainGetCmd,
|
||||
ChainBisectCmd,
|
||||
ChainExportCmd,
|
||||
SlashConsensusFault,
|
||||
ChainGasPriceCmd,
|
||||
ChainInspectUsage,
|
||||
ChainDecodeCmd,
|
||||
ChainEncodeCmd,
|
||||
ChainDisputeSetCmd,
|
||||
},
|
||||
}
|
||||
|
||||
var chainHeadCmd = &cli.Command{
|
||||
var ChainHeadCmd = &cli.Command{
|
||||
Name: "head",
|
||||
Usage: "Print chain head",
|
||||
Action: func(cctx *cli.Context) error {
|
||||
@ -85,7 +85,7 @@ var chainHeadCmd = &cli.Command{
|
||||
},
|
||||
}
|
||||
|
||||
var chainGetBlock = &cli.Command{
|
||||
var ChainGetBlock = &cli.Command{
|
||||
Name: "getblock",
|
||||
Usage: "Get a block and print its details",
|
||||
ArgsUsage: "[blockCid]",
|
||||
@ -176,7 +176,7 @@ func apiMsgCids(in []lapi.Message) []cid.Cid {
|
||||
return out
|
||||
}
|
||||
|
||||
var chainReadObjCmd = &cli.Command{
|
||||
var ChainReadObjCmd = &cli.Command{
|
||||
Name: "read-obj",
|
||||
Usage: "Read the raw bytes of an object",
|
||||
ArgsUsage: "[objectCid]",
|
||||
@ -203,7 +203,7 @@ var chainReadObjCmd = &cli.Command{
|
||||
},
|
||||
}
|
||||
|
||||
var chainDeleteObjCmd = &cli.Command{
|
||||
var ChainDeleteObjCmd = &cli.Command{
|
||||
Name: "delete-obj",
|
||||
Usage: "Delete an object from the chain blockstore",
|
||||
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",
|
||||
Usage: "Collect size and ipld link counts for objs",
|
||||
ArgsUsage: "[cid]",
|
||||
@ -287,7 +287,7 @@ var chainStatObjCmd = &cli.Command{
|
||||
},
|
||||
}
|
||||
|
||||
var chainGetMsgCmd = &cli.Command{
|
||||
var ChainGetMsgCmd = &cli.Command{
|
||||
Name: "getmessage",
|
||||
Usage: "Get and print a message by its cid",
|
||||
ArgsUsage: "[messageCid]",
|
||||
@ -335,7 +335,7 @@ var chainGetMsgCmd = &cli.Command{
|
||||
},
|
||||
}
|
||||
|
||||
var chainSetHeadCmd = &cli.Command{
|
||||
var ChainSetHeadCmd = &cli.Command{
|
||||
Name: "sethead",
|
||||
Usage: "manually set the local nodes head tipset (Caution: normally only used for recovery)",
|
||||
ArgsUsage: "[tipsetkey]",
|
||||
@ -384,7 +384,7 @@ var chainSetHeadCmd = &cli.Command{
|
||||
},
|
||||
}
|
||||
|
||||
var chainInspectUsage = &cli.Command{
|
||||
var ChainInspectUsage = &cli.Command{
|
||||
Name: "inspect-usage",
|
||||
Usage: "Inspect block space usage of a given tipset",
|
||||
Flags: []cli.Flag{
|
||||
@ -529,7 +529,7 @@ var chainInspectUsage = &cli.Command{
|
||||
},
|
||||
}
|
||||
|
||||
var chainListCmd = &cli.Command{
|
||||
var ChainListCmd = &cli.Command{
|
||||
Name: "list",
|
||||
Aliases: []string{"love"},
|
||||
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",
|
||||
Usage: "Get chain DAG node by path",
|
||||
ArgsUsage: "[path]",
|
||||
@ -905,7 +905,7 @@ func printTipSet(format string, ts *types.TipSet) {
|
||||
fmt.Println(format)
|
||||
}
|
||||
|
||||
var chainBisectCmd = &cli.Command{
|
||||
var ChainBisectCmd = &cli.Command{
|
||||
Name: "bisect",
|
||||
Usage: "bisect chain for an event",
|
||||
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",
|
||||
Usage: "export chain to a car file",
|
||||
ArgsUsage: "[outputPath]",
|
||||
@ -1106,7 +1106,7 @@ var chainExportCmd = &cli.Command{
|
||||
},
|
||||
}
|
||||
|
||||
var slashConsensusFault = &cli.Command{
|
||||
var SlashConsensusFault = &cli.Command{
|
||||
Name: "slash-consensus",
|
||||
Usage: "Report consensus fault",
|
||||
ArgsUsage: "[blockCid1 blockCid2]",
|
||||
@ -1227,7 +1227,7 @@ var slashConsensusFault = &cli.Command{
|
||||
},
|
||||
}
|
||||
|
||||
var chainGasPriceCmd = &cli.Command{
|
||||
var ChainGasPriceCmd = &cli.Command{
|
||||
Name: "gas-price",
|
||||
Usage: "Estimate gas prices",
|
||||
Action: func(cctx *cli.Context) error {
|
||||
@ -1254,7 +1254,7 @@ var chainGasPriceCmd = &cli.Command{
|
||||
},
|
||||
}
|
||||
|
||||
var chainDecodeCmd = &cli.Command{
|
||||
var ChainDecodeCmd = &cli.Command{
|
||||
Name: "decode",
|
||||
Usage: "decode various types",
|
||||
Subcommands: []*cli.Command{
|
||||
@ -1334,7 +1334,7 @@ var chainDecodeParamsCmd = &cli.Command{
|
||||
},
|
||||
}
|
||||
|
||||
var chainEncodeCmd = &cli.Command{
|
||||
var ChainEncodeCmd = &cli.Command{
|
||||
Name: "encode",
|
||||
Usage: "encode various types",
|
||||
Subcommands: []*cli.Command{
|
||||
|
@ -74,7 +74,7 @@ var Commands = []*cli.Command{
|
||||
WithCategory("developer", authCmd),
|
||||
WithCategory("developer", mpoolCmd),
|
||||
WithCategory("developer", stateCmd),
|
||||
WithCategory("developer", chainCmd),
|
||||
WithCategory("developer", ChainCmd),
|
||||
WithCategory("developer", LogCmd),
|
||||
WithCategory("developer", waitApiCmd),
|
||||
WithCategory("developer", fetchParamCmd),
|
||||
|
@ -35,7 +35,7 @@ type minerDeadline struct {
|
||||
index uint64
|
||||
}
|
||||
|
||||
var chainDisputeSetCmd = &cli.Command{
|
||||
var ChainDisputeSetCmd = &cli.Command{
|
||||
Name: "disputer",
|
||||
Usage: "interact with the window post disputer",
|
||||
Flags: []cli.Flag{
|
||||
|
Loading…
Reference in New Issue
Block a user