Merge pull request #9321 from filecoin-project/gstuart/actors-cids-cli-network-version
fix: cli: actor-cids cli command now defaults to current network
This commit is contained in:
commit
7d3b7fe728
11
cli/state.go
11
cli/state.go
@ -1900,7 +1900,6 @@ var StateSysActorCIDsCmd = &cli.Command{
|
|||||||
&cli.UintFlag{
|
&cli.UintFlag{
|
||||||
Name: "network-version",
|
Name: "network-version",
|
||||||
Usage: "specify network version",
|
Usage: "specify network version",
|
||||||
Value: uint(build.NewestNetworkVersion),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
@ -1916,7 +1915,15 @@ var StateSysActorCIDsCmd = &cli.Command{
|
|||||||
|
|
||||||
ctx := ReqContext(cctx)
|
ctx := ReqContext(cctx)
|
||||||
|
|
||||||
nv := network.Version(cctx.Uint64("network-version"))
|
var nv network.Version
|
||||||
|
if cctx.IsSet("network-version") {
|
||||||
|
nv = network.Version(cctx.Uint64("network-version"))
|
||||||
|
} else {
|
||||||
|
nv, err = api.StateNetworkVersion(ctx, types.EmptyTSK)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fmt.Printf("Network Version: %d\n", nv)
|
fmt.Printf("Network Version: %d\n", nv)
|
||||||
|
|
||||||
|
@ -2029,7 +2029,7 @@ USAGE:
|
|||||||
lotus state actor-cids [command options] [arguments...]
|
lotus state actor-cids [command options] [arguments...]
|
||||||
|
|
||||||
OPTIONS:
|
OPTIONS:
|
||||||
--network-version value specify network version (default: 17)
|
--network-version value specify network version (default: 0)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user