actor-cids cli command now defaults to current network version instead of newest

This commit is contained in:
Geoff Stuart 2022-09-15 10:42:44 -04:00
parent 7dd12f88e1
commit 609dad02a2
2 changed files with 10 additions and 3 deletions

View File

@ -1900,7 +1900,6 @@ var StateSysActorCIDsCmd = &cli.Command{
&cli.UintFlag{
Name: "network-version",
Usage: "specify network version",
Value: uint(build.NewestNetworkVersion),
},
},
Action: func(cctx *cli.Context) error {
@ -1916,7 +1915,15 @@ var StateSysActorCIDsCmd = &cli.Command{
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)

View File

@ -2029,7 +2029,7 @@ USAGE:
lotus state actor-cids [command options] [arguments...]
OPTIONS:
--network-version value specify network version (default: 17)
--network-version value specify network version (default: 0)
```