Merge pull request #2302 from filecoin-project/asr/cli

Minor CLI improvements
This commit is contained in:
Łukasz Magiera 2020-07-08 00:01:31 +02:00 committed by GitHub
commit 683aded05c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 10 deletions

View File

@ -385,8 +385,8 @@ var clientRetrieveCmd = &cli.Command{
ArgsUsage: "[dataCid outputPath]", ArgsUsage: "[dataCid outputPath]",
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.StringFlag{ &cli.StringFlag{
Name: "address", Name: "from",
Usage: "address to use for transactions", Usage: "address to send transactions from",
}, },
&cli.BoolFlag{ &cli.BoolFlag{
Name: "car", Name: "car",
@ -411,8 +411,8 @@ var clientRetrieveCmd = &cli.Command{
ctx := ReqContext(cctx) ctx := ReqContext(cctx)
var payer address.Address var payer address.Address
if cctx.String("address") != "" { if cctx.String("from") != "" {
payer, err = address.NewFromString(cctx.String("address")) payer, err = address.NewFromString(cctx.String("from"))
} else { } else {
payer, err = fapi.WalletDefaultAddress(ctx) payer, err = fapi.WalletDefaultAddress(ctx)
} }
@ -498,7 +498,7 @@ var clientQueryAskCmd = &cli.Command{
}, },
Action: func(cctx *cli.Context) error { Action: func(cctx *cli.Context) error {
if cctx.NArg() != 1 { if cctx.NArg() != 1 {
fmt.Println("Usage: query-ask [address]") fmt.Println("Usage: query-ask [minerAddress]")
return nil return nil
} }

View File

@ -58,7 +58,7 @@ var msigCreateCmd = &cli.Command{
Value: "0", Value: "0",
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "sender", Name: "from",
Usage: "account to send the create message from", Usage: "account to send the create message from",
}, },
}, },
@ -85,7 +85,7 @@ var msigCreateCmd = &cli.Command{
// get the address we're going to use to create the multisig (can be one of the above, as long as they have funds) // get the address we're going to use to create the multisig (can be one of the above, as long as they have funds)
var sendAddr address.Address var sendAddr address.Address
if send := cctx.String("sender"); send == "" { if send := cctx.String("from"); send == "" {
defaddr, err := api.WalletDefaultAddress(ctx) defaddr, err := api.WalletDefaultAddress(ctx)
if err != nil { if err != nil {
return err return err

View File

@ -790,8 +790,8 @@ var stateComputeStateCmd = &cli.Command{
Usage: "Perform state computations", Usage: "Perform state computations",
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.Uint64Flag{ &cli.Uint64Flag{
Name: "height", Name: "vm-height",
Usage: "set the height to compute state at", Usage: "set the height that the vm will see",
}, },
&cli.BoolFlag{ &cli.BoolFlag{
Name: "apply-mpool-messages", Name: "apply-mpool-messages",
@ -820,7 +820,7 @@ var stateComputeStateCmd = &cli.Command{
return err return err
} }
h := abi.ChainEpoch(cctx.Uint64("height")) h := abi.ChainEpoch(cctx.Uint64("vm-height"))
if h == 0 { if h == 0 {
if ts == nil { if ts == nil {
head, err := api.ChainHead(ctx) head, err := api.ChainHead(ctx)