From 609dad02a2d223a276c7fc56feb25b881f775d32 Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Thu, 15 Sep 2022 10:42:44 -0400 Subject: [PATCH] actor-cids cli command now defaults to current network version instead of newest --- cli/state.go | 11 +++++++++-- documentation/en/cli-lotus.md | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/cli/state.go b/cli/state.go index a0fc49f30..51c3b3911 100644 --- a/cli/state.go +++ b/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) diff --git a/documentation/en/cli-lotus.md b/documentation/en/cli-lotus.md index 0a064be76..ad978fd4b 100644 --- a/documentation/en/cli-lotus.md +++ b/documentation/en/cli-lotus.md @@ -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) ```