actor-cids cli command now defaults to current network version instead of newest
This commit is contained in:
parent
7dd12f88e1
commit
609dad02a2
11
cli/state.go
11
cli/state.go
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user